in reply to DBD::ODBC and FreeTDS / limited to one statement handle

The TDS protocol was originally limited to one statement handle per database connection. You can see the same issue with DBD::Sybase using the Sybase client.

In some cases (specifically when using a cursor on a query rather than a "normal" stream request) TDS will allow more than one open statement handle (at least with Sybase open client).

I suspect that FreeTDS may be more limited in this case than the native MS client.

Michael

PS - DBD::Sybase has a work-around for this where it "cheats" by opening additional connection handles where necessary. That's actually a pretty ugly hack that can lead to deadlocks, etc...

  • Comment on Re: DBD::ODBC and FreeTDS / limited to one statement handle

Replies are listed 'Best First'.
Re^2: DBD::ODBC and FreeTDS / limited to one statement handle
by talexb (Chancellor) on May 15, 2024 at 18:18 UTC
      The TDS protocol was originally limited to one statement handle per database connection. You can see the same issue with DBD::Sybase using the Sybase client.

    Aha! This is the content that I was looking for.

    And this is fine -- I just needed to really determine exactly what the limitation was, and then get my brain to suggest a workaround (not really a hack). And now I have it. Thanks to all who answered -- I appreciate you! If you're in Vegas next month, hit me up for a beer, and I will gladly buy. :)

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.