Microsoft KB Archive/292604

= FIX: Microsoft ODBC Driver for Oracle Is Not Successful on Client Cursor with Embedded Bracket =

Article ID: 292604

Article Last Modified on 9/26/2005

-

APPLIES TO


 * Microsoft Data Access Components 2.5 Service Pack 1
 * Microsoft Data Access Components 2.5 Service Pack 2

-



This article was previously published under Q292604



SYMPTOMS
When you use a client-side cursor against an Oracle database with the Microsoft ODBC Driver for Oracle, a deferred update is not successful and you receive the following error message:

0x80004005 (&quot;Insufficient base table information for updating or refreshing&quot;)

This occurs when the SQL SELECT statement includes a WHERE clause that has an embedded bracket. The problem only occurs with a client-side cursor when the criteria in the WHERE clause of the recordset is put in parentheses and the string criteria contains brackets.



CAUSE
The ActiveX Data Objects (ADO) Client Cursor Engine does not successfully parse the statement, and cannot update the recordset.



RESOLUTION
To resolve this problem, obtain the latest service pack for Microsoft MDAC 2.5. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

293312INFO: How to Obtain the Latest MDAC 2.5 Service Pack

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

  Date         Version       Size     File name     Platform 03-07-2001  2.53.7307     327,952  Msadce.dll    x86



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft MDAC 2.5 Service Pack 3.



MORE INFORMATION
The problem does not occur with the Microsoft OLE DB provider for Oracle (MSDAORA).

Steps to Reproduce the Behavior
 Create a new Microsoft Visual Basic 6.0 Standard EXE Project. By default, Form1 is created. On the Project menu, click References, and then add a reference to Microsoft ActiveX Data Objects 2.5 Library.  Paste the following code in the Form_Load event of Form1:

Dim con As ADODB.Connection Dim rst As ADODB.Recordset Set con = New ADODB.Connection With con .CursorLocation = adUseClient .ConnectionString = &quot;Provider=MSDASQL.1;UID=MyUser;PWD=MyPwd;DRIVER={Microsoft ODBC for Oracle};SERVER=MyServer;&quot; .Open End With Set rst = New ADODB.Recordset With rst .ActiveConnection = con .CursorLocation = adUseClient .CursorType = adOpenStatic .LockType = adLockOptimistic 'This one fails! .Source = &quot;SELECT MyKey,UpdateVal,LookUpVal FROM UpdateTest WHERE (LookUpVal = 'Test2(Test2')&quot;   'This one works!        '.Source = &quot;SELECT MyKey,UpdateVal,LookUpVal FROM UpdateTest where LookUpVal='Test1'&quot;    .Open  End With  rst.Fields(1).Value = 200  rst.Update                     Change the connection string to connect to your Oracle server. Create an UpdateTest table with MyKey (primary key), UpdateVal, and LookUpVal.</li> Add two rows as follows: <ul> First record contains LookUpVal = Test2(Test2 </li> Second record contains LookUpVal = Test1 </li></ul>

</li> Start the project.</li></ol>

<div class="references_section">