Skip to Content.
Sympa Menu

freetds - Re: [freetds] Query timeout with db-lib

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: jklowden AT schemamania.org
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Query timeout with db-lib
  • Date: Wed, 9 Dec 2009 11:05:32 -0500

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




Archive powered by MHonArc 2.6.24.

Top of Page