FIX: "Base table fields" Error When Running a View (176578)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Macintosh 3.0b

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

  1. Open and modify the Testdata sample database located in the \Vfp\Samples\Data folder.
  2. 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.
  3. 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.
  4. Save the view as Cust_view1.
  5. Create a second view based on the view you just created, leaving out the Address field.
  6. Follow step 4 and save the view as Cust_view2.
  7. In the FoxPro Command window, type CLOSE TABLES and press ENTER.
  8. 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.
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.

Modification Type:MajorLast Reviewed:5/10/2003
Keywords:kbbug kbfix kbprb kbvfp600fix KB176578