Skip to Content.
Sympa Menu

freetds - Re: [freetds] Nested Select Statements

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] Nested Select Statements
  • Date: Wed, 9 May 2012 09:54:47 -0400

On Mon, 7 May 2012 23:18:21 -0400
Jeremy Livingston <jeremyjlivingston AT gmail.com> wrote:

Kudos for isolating the issue and stating it clearly. You had to peer
through quite a few layers to get to the crux of the matter.

> 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.
...
> 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?

Yes, but it's not an implementation detail; Microsoft's driver behaves
the same way. As the FAQ answer says, the TDS *protocol* requires all
results be processed before the server will accept another query.

> > 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?

You may find http://www.freetds.org/mars.html helpful to understand
the misunderstanding of how tcp/ip and database server connections are
designed and used.

Other than that, you might want to inform the Doctrine folks that their
software is out of spec. ODBC doesn't require drivers to provide the
behavior their software evidently needs.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page