freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Ou Liu" <OLiu AT corillian.com>
- To: <freetds AT lists.ibiblio.org>
- Subject: [freetds] Query Time Out
- Date: Mon, 7 Aug 2006 15:21:42 -0700
Sorry, looks like my former post is missing:
Hi,
When using the ODBC driver of FreeTDS, the query will time
out if the query was sent by a statement used before. The code was like:
------------------------------------------------------------------------
------------------------------------------------------------------------
---------------------------
SQLSetStmtAttr (hstmt, SQL_ATTR_QUERY_TIMEOUT, (SQLPOINTER)
40, SQL_IS_UINTEGER);
SQLPrepare(hstmt, "...");
SQLExecute(hstmt);
// fetch the data
// Wait for 3 minutes
SQLFreeStmt(hstmt, SQL_CLOSE);
SQLFreeStmt(hstmt, SQL_UNBIND);
SQLFreeStmt(hstmt, SQL_RESET_PARAMS);
SQLCloseCursor(hstmt);
SQLSetStmtAttr (hstmt, SQL_ATTR_QUERY_TIMEOUT, (SQLPOINTER)
40, SQL_IS_UINTEGER);
SQLPrepare(hstmt, "...");
SQLExecute(hstmt); // here I got a timeout.
------------------------------------------------------------------------
------------------------------------------------------------------------
---------------------------
It looks to me the tds->query_start_time inside the hstmt
was not cleaned up correctly. (Actually the value is the old time for
the first query) This data member looks like a new one to me. (I am
still using the a FreeTDS version from 2004 and only recently updated to
the 0.64 stable)
For now I will just create a new statement handle for each
new query, but I would like to know whether it is a bug or just I am
writing the wrong code.
-
[freetds] Query Time Out,
Ou Liu, 08/07/2006
- <Possible follow-up(s)>
- [freetds] Query Time Out, Ou Liu, 08/07/2006
- Re: [freetds] Query Time Out, ZIGLIO, Frediano, VF-IT, 08/08/2006
- Re: [freetds] Query Time Out, ZIGLIO, Frediano, VF-IT, 08/08/2006
- [freetds] Query Time Out, Ou Liu, 08/08/2006
-
Re: [freetds] Query Time Out,
ZIGLIO, Frediano, VF-IT, 08/08/2006
-
Re: [freetds] Query Time Out,
Christos Zoulas, 08/08/2006
-
Re: [freetds] Query Time Out,
Frediano Ziglio, 08/08/2006
- Re: [freetds] Query Time Out, Christos Zoulas, 08/08/2006
-
Re: [freetds] Query Time Out,
Frediano Ziglio, 08/08/2006
-
Re: [freetds] Query Time Out,
Christos Zoulas, 08/08/2006
- Re: [freetds] Query Time Out, ZIGLIO, Frediano, VF-IT, 08/08/2006
-
Re: [freetds] Query Time Out,
ZIGLIO, Frediano, VF-IT, 08/11/2006
- Re: [freetds] Query Time Out, Christos Zoulas, 08/11/2006
Archive powered by MHonArc 2.6.24.