VB6.0 timeout accessing SQL Server
-
I have a number of stored procs in SQL Server that I call from my VB code. Some of them can take up to 2 hours to run and I am getting timeout errors in VB. Is there a way to extend the timeout interval or even switch it off for these stored procs (returning to defaults after the proc has run)? Thanks in advance, John.
-
I have a number of stored procs in SQL Server that I call from my VB code. Some of them can take up to 2 hours to run and I am getting timeout errors in VB. Is there a way to extend the timeout interval or even switch it off for these stored procs (returning to defaults after the proc has run)? Thanks in advance, John.
Not for two hours, no. A much better solution would be to fire off a scheduled job on the SQL server and when it completes, use SQL's Notification Services to alert your VB app that it completed, if it's still running that is. Or some other disconnected solution. The reason being is that you can't trust the VB app, or the machine it's running on for that matter, to stay running for that entire time. A power failure would result in a bad situation if your app must be counted on to be running the entire time.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
Not for two hours, no. A much better solution would be to fire off a scheduled job on the SQL server and when it completes, use SQL's Notification Services to alert your VB app that it completed, if it's still running that is. Or some other disconnected solution. The reason being is that you can't trust the VB app, or the machine it's running on for that matter, to stay running for that entire time. A power failure would result in a bad situation if your app must be counted on to be running the entire time.
Dave Kreskowiak Microsoft MVP - Visual Basic