Skip to Content.
Sympa Menu

freetds - [freetds] Nested Select Statements

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Jeremy Livingston <jeremyjlivingston AT gmail.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Nested Select Statements
  • Date: Mon, 7 May 2012 23:18:21 -0400

Hello,

I am connecting to a Microsoft SQL Server 2008 database using unixODBC and
FreeTDS on PHP. Everything was going well until the ORM library that I'm
using (Doctrine) attempted to perform a select statement while cycling
through the result set of another query. I received the error:
"SQLSTATE[24000]: Invalid cursor state: 0 [FreeTDS][SQL Server]Invalid
cursor state (SQLExecute[0] at ../pdo_odbc/odbc_stmt.c:254)"

After doing some research, it appears that this behavior is by-design in
FreeTDS (http://www.freetds.org/faq.html#pending). Is this error that I'm
getting because of this implementation detail? If so, are there any plans
to change this behavior? If not, does anyone have any recommendations for a
driver I could use with PHP that would allow this behavior?

Under normal circumstances, I would simply adjust the code myself. However,
since I'm using someone else's library, I don't exactly have this luxury.

Any suggestions are appreciated.
Thank you!




Archive powered by MHonArc 2.6.24.

Top of Page