Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7E43A650EA7 for ; Mon, 30 Jun 2008 17:08:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26871-01 for ; Mon, 30 Jun 2008 17:08:04 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.235]) by postgresql.org (Postfix) with ESMTP id 69651650E9F for ; Mon, 30 Jun 2008 17:08:06 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so1749792rvf.43 for ; Mon, 30 Jun 2008 13:08:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=nhkql9sy5gQFOqKR0H88OMlEocgvqwHn1kygNLHndlg=; b=MeMGddVqLE0SP/SF4f9RV/lmrpAGMpjkCBuJS3/ZimP6Jjhun/3+xVPgvkf0C+pjb3 s150m8pjSunqsQxQBJLpfESM9EDChJknbqhZXShkGc7mALZ1jDY8U7hT5uUY9rF6iEn0 yq6urNWcvziMILWkSdC9zeQw4tq/zH6/HoIfE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=lkv01iT4wpWx5dU5qBvPzsSHg+9Eb+knBGiALZt7eaa/rHbPHSlpTa7od8QNF5yNH7 iJqRz8D0ZghaF0M0JwIBt05Wxd7UA5svARVFNwotBIxcvgT/e0RihzmDKRJIGrSZ+ky0 0eUxbMa69sEUxgk/q9NJZp7lTAxA/96aNU+zA= Received: by 10.141.79.12 with SMTP id g12mr2946881rvl.126.1214856484775; Mon, 30 Jun 2008 13:08:04 -0700 (PDT) Received: by 10.140.148.19 with HTTP; Mon, 30 Jun 2008 13:08:04 -0700 (PDT) Message-ID: <396486430806301308p7a2e214dv23bfaa95011601b8@mail.gmail.com> Date: Mon, 30 Jun 2008 13:08:04 -0700 From: "Richard Broersma" To: "Pam Driscoll" Subject: Re: SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STATE Cc: pgsql-odbc@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/25 X-Sequence-Number: 9555 On Mon, Jun 30, 2008 at 8:42 AM, Pam Driscoll 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