Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Jarhead104
Starting Member
10 Posts |
Posted - 2010-04-23 : 12:26:02
|
| Hey!Im trying to execute the following commands:DECLARE @obj intEXEC sp_oacreate 'WScript.Shell', @obj OUTEXEC sp_oamethod @obj,'RUN("C:\scripts\SendMailOnTicket.vbs "8" "8" "8" "8" "8" "8" "8" "8" "8" "8" "8" "8"", 0)EXEC sp_oadestroy @objRETURNThe problem here is that the RUN command needs the following syntax:RUN("<command_here",0)Now, when I try to execute a command with paramters (and I also have to write the parameters in quotes because they WILL contain spaces) the command above is actually:RUN("C:\scripts\SendMailOnTicket.vbs "because the RUN statement thinks the command ends with the first quote of the first parameter.How can I prevent this?Thank you!Best Regardsjarhead104 |
|
|
|
|
|