Question Locked

Need help supressing timeout in VB.net

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a call to a database that can take hours to return the result set. (searches through over 1 million records)

If V.sSerialNum Is Nothing Then
s.FillAllErrByModel(t, V.sStartDate, V.sEndDate, V.sModel, V.sProduct)
end if

(t is the datatable and s is the adapter)

How do I supress the timeout, and where do I place the code to do this?

Thanks in advace for any help.

4 replies

by tony hopkinson

In theory zero should make it in definite.
It's known to be iffy depending on what driver your are using apparently.

This is actually the client requesting the server to kill the query by the way, if it works don't do it on your 'general' connection.

Personally I'd look at pumping this into some reporting tables out of hours or some such and do it from a batch job.
Then may be some log table populated at end of the job and poll for the update.

http://www.thescripts.com/forum/thread81116.html

by locrian_lyric

I found something else that worked for what I needed.

I went into the table adapter and added the following code....

Me._commandCollection(1).CommandTimeout = 150000

That gives me four hours (good for troubleshooting.

Hope it helps someone else.

Thanks for putting me on the right track!

This discussion is closed to new replies.