Microsoft KB Archive/176578

= FIX: "Base table fields" Error When Running a View =

Article ID: 176578

Article Last Modified on 5/10/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 3.0b for Macintosh

-



This article was previously published under Q176578



SYMPTOMS
When you use a view to create another view, you may receive this error when you run the second view:

Base table fields have been changed and no longer match view fields.

After you try to modify the view, this error occurs:

Invalid File Descriptor.

Visual FoxPro (VFP) for Windows closes with an Illegal Operation error in Windows 95 or you receive a Vfp.exe Application Error in Windows NT 4.0.

In Visual FoxPro for Macintosh you receive the two error messages but the application does not close.



RESOLUTION
The second view must be deleted from the database and re-created while adding all of the fields from the first view.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This has been corrected in Visual FoxPro 6.0.



MORE INFORMATION
When you work with views, if a field is removed in the base table or in a view that another view is based on, you expect the "Base table fields" error message to occur. Because the field in the second view is trying to update a field in the first view or the base table and that field is not there, this error should occur. Unfortunately, this error also occurs if one or more fields are left out when you create each view. For example, if a view is created on a table and the "First Name" field is removed and then a second view is created based on the first view with the "Last Name" field removed, the error occurs. The tables and views have to be closed and the Send SQL check box must be selected in the Update Criteria tab of View Designer for the error to occur.

Steps to Reproduce Behavior
 Open and modify the Testdata sample database located in the \Vfp\Samples\Data folder. Create a view using the Customer table. In the Database Designer, right-click the mouse and select New Local View. Using the Fields tab, add fields to the view and leave out the Contact field. Click the Update Criteria tab, and then select a key field. Next, click the Update All command button and select the "Send SQL Updates" check box. Save the view as Cust_view1. Create a second view based on the view you just created, leaving out the Address field. Follow step 4 and save the view as Cust_view2.</li> In the FoxPro Command window, type CLOSE TABLES and press ENTER.</li> Double-click the Cust_view2 view in the Database Designer. The following error occurs:

Base table fields have been changed and no longer match view fields.

</li></ol>

Trying to modify the view results produces an "Invalid File Descriptor" error followed by an Illegal Operation error in Windows 95 or you receive a Vfp.exe Application Error in Windows NT 4.0 that closes down Visual FoxPro for Windows.

Additional query words: Remote view

Keywords: kbbug kbfix kbvfp600fix kbprb KB176578

-

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

© Microsoft Corporation. All rights reserved.