in reply to Re^3: Multiple DB Queries using DBI
in thread Multiple DB Queries using DBI

I know that for Oracle and MS SQL (which is the same as Sybase, for all practical purposes), you can have multiple sths executing at once. Heck, without that for Oracle, a lot of Perl code would mysteriously break. :-)

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^5: Multiple DB Queries using DBI
by runrig (Abbot) on Nov 18, 2004 at 21:21 UTC
    DBD::ODBC did not used to allow multiple active statement handles (because ODBC did not allow it). Support for it was added in DBD::ODBC 1.08 if you use odbc_cursortype => DBI::SQL_CURSOR_DYNAMIC on the connect (and it only says it "may allow some servers" to support multiple concurrent statements).
Re^5: Multiple DB Queries using DBI
by mpeppler (Vicar) on Nov 19, 2004 at 07:56 UTC
    updated: changed "physical" to "network" connections.

    With DBD::Sybase multiple active $sth require multiple physical network connections.

    There is a way to have multiple simultaneous queries active on a single connection by using client side cursors, but this seriously limits the type of queries that can be sent so I didn't implement it.

    That said - you can have multiple $sth open at the same time as long as only one is active at a time (meaning that it has been executed and that not all results have been fetched yet.)

    Michael