dBASE INSERT INTO vs. key violation issue

<< Click to Display Table of Contents >>

Navigation:  Tables > File Restructuring > Primary Key Set/Delete >

dBASE INSERT INTO vs. key violation issue

Previous pageReturn to chapter overviewNext page

The dBASE INSERT INTO vs. key violation issue

Adding data to an unique indexed dBASE target table through e.g.:

INSERT INTO TableB SELECT * FROM TableA;

may add only some of the actually non-violating (!) records in a rather disordered selection, but seemingly dependent not only on the indexing and key violations vs. the target table, but also on the target table's internal sequence of the records, and this way loosing an unpredictable number of records*.
So, dBASE users: take care! Do check the ERRORINS.DBF file! See Autoinc/Primary Key Fields.
The way to prevent this mess seems to be recreating and reindexing the target table before transferring data, where proper transfer will depend on key violation checking.

*: Same error consistently present also with Borland Database Desktop 7 and with dBASE 2019, and probably a BDE dBASE error.

__________________________
PdxEditor Application Help, 14 July 2026; © 2010-2026 Niels Knabe