Microsoft KB Archive/311950

= PRB: &quot;Insufficient Base Table Information for Updating&quot; Error Message When You Update a FoxPro Table with the Database Environment =

Article ID: 311950

Article Last Modified on 11/4/2003

-

APPLIES TO

 Microsoft Data Access Components 2.7, when used with:  Microsoft Visual Basic 6.0 Professional Edition

 Microsoft Visual Basic 6.0 Enterprise Edition

 Microsoft Visual Basic 6.0 Enterprise Edition Service Pack 3

 Microsoft Visual Basic 6.0 Enterprise Edition Service Pack 4</li></ul>

 Microsoft Visual Basic 6.0 Enterprise Edition Service Pack 5</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q311950

<div class="symptoms_section">

SYMPTOMS
After you update your system to MDAC 2.7 or install Microsoft Windows XP, you cannot update Data Environment recordsets that you retrieve from Microsoft Visual FoxPro databases by using command objects of type Table and you receive the following error message:

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

<div class="resolution_section">

RESOLUTION
To resolve this behavior, change the command object from Table to SQL Query under Source of Data in the Properties dialog box for the command object. To do this: <ol> In the Data Environment window, right-click the command object, and then click Properties. This opens the Properties dialog box for the command object.</li> Click the SQL Statement button. The SQL command text box is now enabled.</li>  Enter a SQL query, that is similar to the following syntax, in the SQL command text box, referencing your particular table: SELECT * FROM tablename </li></ol>

<div class="moreinformation_section">

Steps to Reproduce the Behavior
<ol> Open a new project in Microsoft Visual Basic.</li> In the New Project dialog box, select Data Project, and then click OK.</li> In Project Explorer, double-click the Data Environment window.</li> Right-click Connection1, the default connection, and then click Properties.</li> Click Microsoft OLE DB Provider for ODBC Drivers from the list on the first tab, and then click Next.</li> Select your Visual FoxPro ODBC data source, and then click OK.</li> In the Data Environment window, right-click the default connection, and then click Add Command.</li> In the Database Object drop-down list box, click Table.</li> In the Object Name drop-down list box, select your table.</li> Click OK to close the Command Properties dialog box.</li> On the Advanced tab, change the Lock Type from 1-Read Only to 3-Optimistic.</li> <li>Open &quot;frmDataEnv&quot; (without quotation marks), the default form, and then add a Button command to the form.</li> <li>Double-click the Button command to open the Click event handler.</li> <li> Add the following code in the Click event handler of the button: DataEnvironment1.rsCommand1.Open DataEnvironment1.rsCommand1(&quot;CharField&quot;).Value = &quot;Testing 123&quot; DataEnvironment1.rsCommand1.Update '<error occurs here DataEnvironment1.rsCommand1.Close MsgBox &quot;done&quot; NOTE: You must replace CharField in line 2 of the code with the name of an existing character field in the database table that you are using.

</li> <li>Run the project. Click the Button command when the default form appears. You will receive the error message that is described in the &quot;Symptoms&quot; section.</li> <li>Stop the application, and return to the Data Environment.</li></ol>

Keywords: kberrmsg kbprb KB311950

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.