Hi,
I am a .net developer.I would like to know the code to execute an sql statement which looks like exec msdb.dbo.sp_start_job @job_name = 'test' from vb6.
Thanks,
Adityaraj.
Printable View
Hi,
I am a .net developer.I would like to know the code to execute an sql statement which looks like exec msdb.dbo.sp_start_job @job_name = 'test' from vb6.
Thanks,
Adityaraj.
Hi aditya... Welcome to the forums...:wave:
Check this tutorial: http://www.vbforums.com/showthread.php?t=381391 :)
Thread moved to 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)
I would actually recommend the "ADO Tutorial" from the "Classic VB" section of our Database Development FAQs/Tutorials (at the top of this forum).
All you need for this is the Connection object, and then you can use code like this:
However, it would also be apt (and better for various reasons) to use a Command object to run it, and there is another FAQ article which covers that.Code:cn.Execute "exec msdb.dbo.sp_start_job @job_name = 'test'"