Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SELECT CASE WHEN errors when using OraOLEDB and Static ADO RS

SELECT CASE WHEN errors when using OraOLEDB and Static ADO RS

From: <olippold_at_hotmail.com>
Date: 15 Dec 2005 02:19:42 -0800
Message-ID: <1134641982.460120.241690@f14g2000cwb.googlegroups.com>


I have a query that uses "CASE WHEN" syntax:

SELECT startdate, (CASE WHEN groupno = 0 THEN 1 ELSE 2 END) AS groupno
FROM ware01
WHERE pbi = '133460125008' AND dateclassed = 20051005 ORDER BY startdate DESC

I use ADO to execute this query from VB6. Recently, we have moved from using the Microsoft ODBC Oracle driver to the Oracle OLE DB driver
(OraOLEDB.Oracle). Now, this query no longer works when opened with a
static cursor ie:

rs.Open sQuery, mobjCon, adOpenStatic

It works okay with a forward-only and with a keyset cursor. It also works with all cursors using the ODBC provider, and with Microsoft's Oracle driver.

I get a variety of errors depending on how I format the query - the example above gives me "ORA-00907 Missing right parenthesis in Execute"

I would like to know what is causing these problems, what work around
(if any) exists, and whether this would apply to all usages on CASE
WHEN. Thanks,
Oliver Received on Thu Dec 15 2005 - 04:19:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US