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

Article translations Article translations
Article ID: 292604 - View products that this article applies to.
This article was previously published under Q292604
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page

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 ("Insufficient base table information for updating or refreshing")
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

  1. Create a new Microsoft Visual Basic 6.0 Standard EXE Project. By default, Form1 is created.
  2. On the Project menu, click References, and then add a reference to Microsoft ActiveX Data Objects 2.5 Library.
  3. 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 = "Provider=MSDASQL.1;UID=MyUser;PWD=MyPwd;DRIVER={Microsoft ODBC for Oracle};SERVER=MyServer;"
        .Open
      End With
      
      Set rst = New ADODB.Recordset
      With rst
        .ActiveConnection = con
        .CursorLocation = adUseClient
        .CursorType = adOpenStatic
        .LockType = adLockOptimistic
        'This one fails!
        .Source = "SELECT MyKey,UpdateVal,LookUpVal FROM UpdateTest WHERE (LookUpVal = 'Test2(Test2')"
        'This one works!
            '.Source = "SELECT MyKey,UpdateVal,LookUpVal FROM UpdateTest where LookUpVal='Test1'"
        .Open
      End With
      
      rst.Fields(1).Value = 200
      rst.Update
    					
  4. Change the connection string to connect to your Oracle server.
  5. Create an UpdateTest table with MyKey (primary key), UpdateVal, and LookUpVal.
  6. Add two rows as follows:
    • First record contains LookUpVal = Test2(Test2
    • Second record contains LookUpVal = Test1

  7. Start the project.

Properties

Article ID: 292604 - Last Review: February 27, 2014 - Revision: 3.2
APPLIES TO
  • Microsoft Data Access Components 2.5 Service Pack 1
  • Microsoft Data Access Components 2.5 Service Pack 2
Keywords: 
kbnosurvey kbarchive kbhotfixserver kbqfe kbmdac250sp3fix kbbug kbfix kboracle kbwin2000sp3fix KB292604

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com