0

I've searched similar topics looking for something closer to what I need, but I haven't had any luck yet. I'm working on a card ID import application, where I need to trigger a SQL job from the user's workstation to import the data into a different database. I did see one post about triggering a job locally from the command line on the local SQL server, but I need to see if I can do this remotely from inside the .NET application.

I already have a connection to the SQL server so that I can import the user information into the photo ID database, but once they have been imported, I need to kick off the scheduled job to run so that it will complete the process.

Kevin Flynn
  • 65
  • 1
  • 3
  • 11
  • 1
    I guess C# is used more frequently than VB.NET. Google https://www.google.com/search?q=Triggering+a+SQL+job+from+c%23 and apply accordingly to your VB.NET code. You will get answers like http://stackoverflow.com/a/10174104/961695 – Yuriy Galanter Nov 01 '13 at 17:51

1 Answers1

0

Use ADO.NET and send the following stored procedure sp_start_job (Transact-SQL) to the msdb db. Here is the MSDN docs. http://technet.microsoft.com/en-us/library/ms186757.aspx

jcwrequests
  • 1,132
  • 1
  • 7
  • 13