PRB: Long Field Names Interfere with the Append Command

Last reviewed: August 29, 1995
Article ID: Q135758
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

SYMPTOMS

If you append records from a version 2.x table onto the end of a version 3.0 table and the version 3.0 table has long field names and is part of a database, Visual FoxPro says the records were added, but they weren't.

CAUSE

The version 3.0 table has long field names. These interfere with the Append operation.

WORKAROUND

The easiest workaround is to rename the long fields to match the field names contained in the version 2.x table; then redo the APPEND FROM operation. When it finishes, rename the fields in the version 3.0 table back to their original names. If you have indexes on your version 3.0 table, Visual FoxPro will object to the name change, so you must also temporarily modify your indexes so that the field names in the indexes match the field names in the table, or delete the indexes.

STATUS

This behavior is by design.

MORE INFORMATION

Code to Demonstrate Behavior

The following code demonstrates this behavior. To resolve this and allow the APPEND FROM command to work, the fields in the Testtab table should be shortened to match the field names in the Testtab2 free table.

*--------------------------------------------------------------------*

* Program: APNDTEST.PRG                                              *
* Purpose: Demonstrates what happens when adding data from a free    *
*          table to a table that has long field names and that is    *
*          part of a database.                                       *
*--------------------------------------------------------------------* CLEAR CLOSE ALL CLEAR ALL CREATE DATABASE testdbc CREATE TABLE testtab (Cust_First_Name C(15), Cust_Last_Name C(25)) CLOSE DATABASE CREATE TABLE testtab2 (Cust_First C(15), Cust_Last C(25)) INSERT INTO testtab2 VALUES ("John", "Henry") INSERT INTO testtab2 VALUES ("Ralph", "Willingham") INSERT INTO testtab2 VALUES ("George", "Weatherford") OPEN DATABASE testdbc USE testtab in 0 APPEND FROM testtab2 BROWSE TITLE "Looking at table TESTTAB - Press ESC to continue!" WAIT WINDOW "Cleaning up test files." CLOSE ALL ERASE testdbc.dbc ERASE testdbc.dbt ERASE testtab.dbf ERASE testtab2.dbf


Additional reference words: 3.00 VFoxWin fail
KBCategory: kbui kbprg kbprb
KBSubcategory: FxotherGeneral


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.

Last reviewed: August 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.