Link to home
Start Free TrialLog in
Avatar of surleysue
surleysue

asked on

How can I call a vbscript from an SQL trigger?

I have a text file to import. One of the fields is username. I have a vbscript to determine full name from AD username. I want the trigger to use the vbscript to determine the full name from the username and insert that information to a field the row.
Avatar of William Elliott
William Elliott
Flag of United States of America image

EXEC xp_cmdshell 'cscript myscript.vbs';
Avatar of surleysue
surleysue

ASKER

Thanks weellio! That's a start. But do you know how I would pass the username field from the text file insert? Could I do:

EXEC xp_cmdshell 'cscript myscript.vbs col002';

Or something like that?

Sorry, rank beginner here.
ASKER CERTIFIED SOLUTION
Avatar of William Elliott
William Elliott
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial