Need help supressing timeout in

By Locrian_Lyric ·
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.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

There is a timeout property on the connection

by Tony Hopkinson In reply to Need help supressing time ...

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.

Collapse -

Thanks Tony!

by Locrian_Lyric In reply to There is a timeout proper ...

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!

Collapse -

Perhaps faster to write it as an Update Query

by alan williams In reply to Need help supressing time ...

Perhaps faster to write it as an Update Query

Related Discussions

Related Forums