how to set query timeout?

Hi,

I have an odbcdatabase (ms sqlserver) and a stored procedure which takes about 25 seconds to start returning data
this results in a query timeout error.

i tried setting the db.timeout, and i now get a invalid cursor stare error

so, my question is… How do i get the data??

I’m also experiencing timeout errors when processing queries. I time them at about 15 seconds when they produce the error. I’ve checked actual queries directly in the database using MS SQL Management Studio and the queries successfully take about 22 seconds.

I’ve tried DB.Timeout = 30, or any value for that matter, with no affect.

How can I set a timeout parameter so that these queries can complete in a reasonable amount of time? Help?

a quick perusal of the docs says timeout wont help as its a LOGIN timeout
http://documentation.xojo.com/index.php/ODBCDatabase.Timeout

you probably need SetConnectionAttribute
http://documentation.xojo.com/index.php/ODBCDatabase.SetConnectionAttribute
Possibly SQL_ATTR_CONNECTION_TIMEOUT