DOCUMENT:Q176578 24-MAR-2000 [foxpro] TITLE :FIX: "Base table fields" Error When Running a View PRODUCT :Microsoft FoxPro PROD/VER:MACINTOSH:3.0b; WINDOWS:3.0,3.0b,5.0,5.0a OPER/SYS: KEYWORDS:kbHWMAC kbvfp kbvfp600fix ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 5.0a - Microsoft Visual FoxPro for Macintosh, version 3.0b ------------------------------------------------------------------------------- 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" (without the quotation marks) 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. Additional query words: Remote view ====================================================================== Keywords : kbHWMAC kbvfp kbvfp600fix Technology : kbHWMAC kbOSMAC kbVFPsearch kbAudDeveloper kbVFP300bMac kbVFP300 kbVFP300b kbVFP500 kbVFP500a Version : MACINTOSH:3.0b; WINDOWS:3.0,3.0b,5.0,5.0a Issue type : kbbug kbprb Solution Type : kbfix ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2000.