[unixODBC-dev] Mult Cursors with UNIXODBC

Don Oliver doliver at nxtv.com
Fri Aug 20 23:08:29 BST 2004


Hi Francisco,

I am a newbie, but I had a similar question and I found this message on a
mailing list on the web :

- - - - - - -

http://lists.ibiblio.org/pipermail/freetds/2003q3/013829.html

"The upper layers can play games, but as far as the server is concerned, a
client must receive all rows from a result set, or cancel the query, before
issuing a new query on the same connection.  That's a property of the TDS
protocol.

If you issue a query that returns 100 rows, fetch 20 rows, and then attempt
to issue a new query, you should get an error message indicating there are
"pending results".  The server requires you to either fetch the remaining 80
rows, or cancel the query (allowing it to discard the rows) before
proceeding.

Server-side cursors on Sybase change things a bit.  FreeTDS doesn't support
them (yet), however.

When I said "play games", I meant that nothing prevents a higher layer from
opening a new connection to manage a second result set.  Perl's DBD::Sybase
does that sometimes.  From what I read about PHP, I doubt it does anything
so fancy."

- - - - - - -

I have found that I cannot have multiple outstanding queries on the same
connection.

Hope that helps!

Don


On Fri, 20 Aug 2004, Francisco Mello Siqueira Jr wrote:

> Hello
>
> I'm using UnixODBC with MS-SQLServer and we found problems with multiple
> open cursors.
> The source atached does not run.
>
> May you sugest something to fix it ?
>
> The environment is:
> - Mandrake 10
> - Apache 1.3.??
> - PHP 4.3.8
> - Zend Optimizer 2.5.3
> - FreeTds (last version)
> - Unix Odbc (last version)
>
> Thanks
>
> Francisco Siqueira
> SPES Engenharia
> São Paulo
> Brasil
>
>
>




More information about the unixODBC-dev mailing list