[prev in list] [next in list] [prev in thread] [next in thread]
List: freetds
Subject: Re: [freetds] FreeTDS Digest, Vol 51, Issue 34
From: Jonathan Monroe <monroej_freetds () actualtechnologies ! com>
Date: 2007-04-23 16:50:19
Message-ID: AB26EE89-C363-440A-B9E1-49CF87472D8B () actualtechnologies ! com
[Download RAW message or body]
On Apr 23, 2007, at 11:00 AM, James Lowden wrote:
> Frediano just told me our ODBC driver doesn't honor the timeout in
> freetds.conf. I didn't know that!
>
> According to the ODBC standard, it's up to the application to set a
> timeout via SQLSetStmtAttr(SQL_ATTR_QUERY_TIMEOUT). AFAIK the
> driver is
> allowed to have any default timeout it chooses. FreeTDS's default
> timeout
> is infinite; Microsoft's (AIUI) is shorter.
>
> What we can do is first add a timeout option to bsqlodbc, so we can
> see if
> the timeout is working correctly or not. And we can (eventually)
> change
> the driver to respect the timeout in freetds.conf.
>
> Your original query had to do with RealBasic. On the evidence,
> it's not
> setting a timeout. If we can demonstrate the ODBC driver handles
> timeouts
> correctly, then the question becomes how to put one in effect when
> RealBasic is the "application".
I did a quick test with REALbasic, and it looks like there are some
problems with the ODBC plugin, wrt setting the timeout.
First, the Timeout property is incorrectly requiring a string instead
of an int, so you would have to specify it as follows in your RB code:
Dim db As New ODBCDatabase
db.Timeout = "30" ' should be db.Timeout = 30
Second, according to iODBC trace, the SQLSetConnectOption API
function is not getting called, which may be a side effect of the
first bug.
I have filed a bug report - Dan might want to sign on:
http://www.realsoftware.com/feedback/viewreport.php?reportid=jjotbelo
Unfortunately, I don't think there's a RB workaround, since any
property set using the RB SetConnectionAttribute method:
db.SetConnectionAttribute ODBCConstant.SQL_AUTOCOMMIT, 30
will get set *after* the connection is established.
> I think you have these choices:
>
> 1. Wait for one of us to change the driver.
> 2. Change the driver yourself.
> 3. 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 agree, with the added option of waiting for / influencing the RB
bug to get fixed.
Jonathan
_______________________________________________
FreeTDS mailing list
FreeTDS@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic