Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS and Ubuntu, iodbc

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: mohnd AT egolfscore.com, FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS and Ubuntu, iodbc
  • Date: Tue, 24 Apr 2007 00:42:09 -0400

Dan Mohn wrote:
> Since I don't see a constant for
> Query Timeout in RealBasic and you reference SQLSetStmtAttr, I am
> assuming that it won't to the trick. Especially since I tried it and it
> doesn't seem to work. Does that sound correct based on your experience
> (not the realbasic stuff the connectattr vs. stmtattr)?

I have no relevant experience. Perhaps someone else can help there.

> >> Find the default timeout value (zero) in the ODBC driver, set it to
> something you like, and rebuild. I think this is the simplest and
> easiest option if it meets your needs. <<
>
> I would like to do this to see if the timeout works in conjunction with
> Realbasic. So I've done a bit of homework, and I just want confirmation
> that I am on the right track. In odbc.c, line 1370 I see
> stmt->attr.query_timeout = 0, I should just be able to set this to 20,
> for 20 seconds. Then rebuild TDS 0.65 nightly I downloaded?

Yes, you're on the right track. You might want to just apply Frediano's
patch, posted at 11:07 AM Monday. But if you want to just hack the code,
I think are two critical places:

File Function Line
4 odbc.c _SQLAllocStmt 1441 stmt->attr.query_timeout = 0;
5 odbc.c _SQLExecute 3032 tds->query_timeout = 0;

(Joys of cscope.)

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page