Initiating VB program...

  • I have the need to initiate a VB program when a row is inserted in a table. The VB program's run time will be 3-5 minutes (it's doing lots of file copying). I have some ideas on how to do this but I've never used xp_command. A couple of questions: 1) will SQL be 'waiting' until the VB program is finished and 2) I need suggestions as to how to handle the situation where 2 rows are inserted within say 30 seconds of each other and the first initialization has not completed.

    TIA,

    John

  • This was removed by the editor as SPAM

  • Ok, for the execution why you don't try with xp_cmdshell, here is a extract of the info about

    (xp_cmdshell operates synchronously. Control is not returned until the command shell command completes.

    When you grant execute permissions to users, the users can execute any operating-system command at the Microsoft Windows NT® command shell that the account running Microsoft SQL Server™ has the needed privileges to execute.

    By default, only members of the sysadmin fixed server role can execute this extended stored procedure. You may, however, grant other users permission to execute this stored procedure. )

     

    To handle the possible insertion of another file before the process for the first is complete you can use a trigger on the table to start a store procedure with the xp_cmdshell command and instructions. I hope this helps you.

     

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply