Re: SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STATE - Mailing list pgsql-odbc

From Richard Broersma
Subject Re: SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STATE
Date
Msg-id 396486430806301308p7a2e214dv23bfaa95011601b8@mail.gmail.com
Whole thread Raw
List pgsql-odbc
On Mon, Jun 30, 2008 at 8:42 AM, Pam Driscoll <pamd@us.ibm.com> wrote:
> I'm having the same problem you reported, but only when connecting to an
> Oracle 10.2 database. Our code works fine on earlier versions of Oracle as
> well as DB2 and SQL Server. Did you ever figure out what the problem was and
> how to resolve it?

Yes.  The cause was unexpected.  The short answer was that while
inside a transaction I was re-assigning a recordset object variable to
point to a newly instantiated recordset object without first closing
the recordset object that previously pointed to.  ADO didn't like
this, so it purposely passed an invalid SQL statement to the server so
that the server would be forced a rollback of the entire transaction.

The statement: "SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER
TO UNPREPARED STATE;" is what ADO passed to the server to force an
exception.

Although I have only experienced this project with reassigning opened
recordset object references, I would expect and reassigning other
opened ADODB object would produce the same result.
--
Regards,
Richard Broersma Jr.

Visit the Los Angles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

pgsql-odbc by date:

Previous
From: Devrim GÜNDÜZ
Date:
Subject: Re: Relation of psqlODBC and postgreSQL version
Next
From: "Nick Davis"
Date:
Subject: Function sequence error when executing DELETE with 08.03.0200