Alexander Foken wrote:
MS SQL Server via DBD::ODBC (at least up to Versions 2000 / 1.13) does
NOT support parallel fetching, and as far as I remember the project
involved, there was no other way than to open several parallel
connections, each with a single statement executing and fetching.
There are some strange ways to make MS SQL Server accept multiple
fetching statements, but they weren't supported by DBD::ODBC, as far as
I remember. Essentially, the old MS SQL Servers inherited a
communication protocol (from Sybase) that does not allow multiple
fetching statements. Later versions changed the protocol.
Alexander
There were some ways to use MAS with older MS SQL Servers which were
supported by DBD::ODBC but they are not recommended. See
http://search.cpan.org/~mjevans/DBD-ODBC-1.17/FAQ#Does_DBD::ODBC_support_Multiple_Active_Statements?
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
Peter J. Holzer wrote:
I think the OP may have meant something different: Is it possible to
start fetching from one statement handle before you are finished with
the other?
In general, yes, this is possible, but it depends on the database.
MySQL in particular doesn't support multiple open cursors (at least in
5.0, IIRC). However, DBD::mysql gets around this limitation by reading
the complete resultset into memory in execute, and fetch_* just reads
from the already cached data. So, as far as the DBI programmer is
concerned, multiple open cursors are allowed (until the resultset is too
large to fit into memory - then you need to turn mysql_use_result on and
either fetch all rows or call finish before using another statement
handle).
hp