Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STATE


  • From: "Richard Broersma" <richard(dot)broersma(at)gmail(dot)com>
  • To: "Pam Driscoll" <pamd(at)us(dot)ibm(dot)com>
  • Cc: pgsql-odbc(at)postgresql(dot)org
  • Subject: Re: SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STATE
  • Date: Mon, 30 Jun 2008 13:08:04 -0700
  • Message-id: <396486430806301308p7a2e214dv23bfaa95011601b8@mail.gmail.com> <text/plain>

On Mon, Jun 30, 2008 at 8:42 AM, Pam Driscoll <pamd(at)us(dot)ibm(dot)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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group