[freetds] Is it possible to start another query on aconnectionprovided that not all rows of a previous selectstatement arefetched?

Michael Kochetkov Michael.Kochetkov at synartra.com
Thu Oct 7 10:03:57 EDT 2004


> > Hello,
> > I have encountered the following problem with 
> > freetds-0.63.dev.20040824: if
> > I execute a select query on a connection which returns N 
> > records and I call
> > SQLFetch N or less times then the connection becomes 
> > desperately broken.
> 
> It's not broken, it's just busy. Fetch all result or free the 
> statement
> and use another and will work.
[...]

> > statement gets broken but not the connection itself. On the 
> > other hand there
> > is a (lucky) chance I miss something and everything shall 
> > work for FreeTDS
> > the way it does for me on Windows box (MS ODBC driver for MS 
> > SQL Server).
> 
> MS Box works the same way, many tests in unittests test this behavior
> and works using both FreeTDS driver and MS one...
I am sorry to say you are absolutely right. I am the former RogueWave
customer and absolutely not an ODBC guru. I have just checked the equivalent
RW example and of course it works in the same case - the true sleight of
hand and no deception. Our new ODBC-wrapper library cannot do such a trick.

The only thing I would dare to insist on is that MS ODBC driver works after
N SQLFetch calls, i.e. the last call returns 0 and everything is fine after
that. The FreeTDS requires N+1 SQLFetch calls. I do not consider this as a
problem - it is for your information only.

Thank you very much,
-
Michael Kochetkov.



More information about the FreeTDS mailing list