Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Can i execute two queries connecting to same DB at a time.

by afoken (Parson)
on May 09, 2009 at 01:33 UTC ( #762982=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Can i execute two queries connecting to same DB at a time.
in thread Can i execute two queries connecting to same DB at a time.

DBD::ODBC does support MAS and MARS, as documented in DBD::ODBC::FAQ. But unlike a proper RDBMS, MAS and MARS require special coding and have surprising side effects. Those problems come from the underlying communication protocol (and probably the MS SQL Server code itself) and do not exist in Oracle, PostgreSQL and other RBDMSs.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)


Comment on Re^4: Can i execute two queries connecting to same DB at a time.
Re^5: Can i execute two queries connecting to same DB at a time.
by Jenda (Abbot) on May 10, 2009 at 12:05 UTC

    I don't buy your definition of "proper RDBMS", it's way too ad hoc. Made up just to allow you to bash MSSQL. MS SQL has the communication protocol optimized for the common case, "you ask for data, you fetch the data, you ask for some other data, you fetch that data". The requirement of the special coding is caused more by the fact that there is no DBD::MSSQL, but rather a generic DBD::ODBC that has to support a lot more than just the MSSQL. So it cannot transparently handle the more complex cases.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      DBD::ODBC does support multiple active statements.

      Yes, life is quite complex for DBD::ODBC in some places but these are more to do with the a) the ODBC spec being quite loosely defined in places b) the great variations in what ODBC drivers do and don't support c) bugs in ODBC drivers.

      The old "trick" to get multiple active statements was to make SQL Server use dynamic cursors but it had side effects. Now MS have added MARS support multiple active statements are officially documented and supported.

      None of this made any difference to DBD::ODBC since both the "trick" to get dynamic cursors and MARS is done through ODBC and not some specific workaround for SQL Server.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://762982]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2014-09-15 02:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls