Click to See Complete Forum and Search --> : Is this a bug of Oracle ODBC driver ?


jesvh
November 25th, 2007, 09:35 PM
Dear all:

I encounter a problem that happens on Oracle DB only ....

The problem is about the ODBC driver of Oracle 9i (9.2.0.8), or 10g (10.1.0.5) client on windows, coding with Microsoft VisualC 6 MFC CRecordset class as below:

MyRecordset rc(pDB); // MyRecordset is inherit from CRecordset

rc.Open( dynaset, NULL, 0 ); // open recordset with dynaset type

rc.m_strFilter = "field1=? and field2=?"; // I want query by 2 parameters

rc.m_filed1Param = 12;
rc.m_field2Param = "abc";
rc.Requery(); // 1st query, It works fine

// then

rc.m_field1Param = 34;
rc.m_field2Param = "def";
rc.Requery(); // It fails ....... ORA-01008 not all variables bound

If I change the m_strFilter string every time, it works,
or the second query always fail with
ORA-01008 = not all variables bound

but the same code works fine under snapshot mode in Oracle
( recordset open type snapshot and db open option 'useCursorLib' )

MySQL(snapshot), SQL Server (snapshot and dynaset) all working fine.

So, I wonder if it's a bug of Oracle driver ?