Re: Query timeout with db-lib

[email protected]
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Wed, Dec 09, 2009 at 12:34:49PM +0000, Damien Churchill wrote:
> Is it possible to set the query timeout on a per-connection basis as
> dbsettime appears to work across all connections opened by the
> application?

It's not, but it could be.  Microsoft defines DBSETTIME as a valid option for dbsetopt(), and TDSCONNECTION includes query_timeout.  You just need cases for dbsetopt(), dbisopt(), and dbclropt().  

It's not clear from the documentation if 

	dbclropt( dbproc, DBSETTIME, 0 )
	
should reset the timeout to the library default, or to the previous value. 

Patches welcome!  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.