PRB: Error Updating adUseClient Cursor Based on MDB Query

ID: Q190108


The information in this article applies to:


SYMPTOMS

Trying to update a client-cursor, generated by calling a QueryDef from an MDB causes the following error to appear:

Run-time error '-2147467259(80004005)': Insufficient base table information for updating or refreshing.


CAUSE

Jet does not provide metadata or base table information through IcolumnsRowset. The only other option would be to parse the SQL statement for the metadata. However, it is not possible to parse a stored procedure call.


RESOLUTION

Use a server-side cursor or a straight SQL statement to open the recordset.


STATUS

This behavior is by design.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a user DSN that points to the Nwinds.mdb file.


  2. Create a "Standard EXE" project in Visual Basic.


  3. On the Project menu, click References, and select Microsoft ActiveX Data Objects 2.0 Library.


  4. Copy and paste the following code into the default form.
    
       Dim con As ADODB.Connection
       Dim com As ADODB.Command
       Dim res As ADODB.Recordset
       Dim par As ADODB.Parameter
    
       Set con = New ADODB.Connection
       Set com = New ADODB.Command
       Set res = New ADODB.Recordset
    
       con.ConnectionString = "dsn=nwind;usid=admin;pwd=;"
       con.CursorLocation = adUseClient
       con.Open
    
       set com.ActiveConnection = con
       com.CommandText = "{call Invoices}"
       com.CommandType = adCmdText
    
       res.Open com, , adOpenStatic, adLockOptimistic, -1
       res(1) = "test"
       res.Update 'This line causes the error.
    
       res.Close
       con.Close
       Set res = Nothing
       Set com = Nothing
       Set con = Nothing 


Additional query words: kbDSupport kbdse kbado150 kbado200


Keywords          : kbADO150 kbADO200 kbVBp600 kbDSupport kbMDAC200 
Version           : WINDOWS:1.5,2.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: May 26, 1999