|
<< Click to Display Table of Contents >> ClientDataSet AutoInc export issue |
![]() ![]()
|
When exporting a Paradox table having an Autoinc field, the Autoinc specification of the Autoinc field will be specified and exported to the CDS file, but as an unresolved issue, a BDE error in the Paradox-to-ClientDataSet file export results in missing Autoinc counter information.
For example a table like this, the first field being an Autoinc field

will export like this (as visualized with the XML format)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <DATAPACKET Version="2.0"> <METADATA> <FIELDS> <FIELD attrname="Idx" fieldtype="i4" readonly="true" SUBTYPE="Autoinc"/> <FIELD attrname="FirstName" fieldtype="string" WIDTH="15"/> <FIELD attrname="LastName" fieldtype="string" WIDTH="15"/> </FIELDS> <PARAMS/> </METADATA> <ROWDATA> <ROW Idx="1" FirstName="Adam" LastName="Smith"/> <ROW Idx="2" FirstName="Isaac" LastName="Larpent"/> </ROWDATA> </DATAPACKET> |
where the Autoinc propagation in a CDS viewer/editor will be non-functional due to the missing counter information.
However, manually correcting this issue (with a plain text editor) with insertion of the due next Autoinc value (in this case: AUTOINCVALUE="3") will solve this problem:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <DATAPACKET Version="2.0"> <METADATA> <FIELDS> <FIELD attrname="Idx" fieldtype="i4" readonly="true" SUBTYPE="Autoinc"/> <FIELD attrname="FirstName" fieldtype="string" WIDTH="15"/> <FIELD attrname="LastName" fieldtype="string" WIDTH="15"/> </FIELDS> <PARAMS AUTOINCVALUE="3"/> </METADATA> <ROWDATA> <ROW Idx="1" FirstName="Adam" LastName="Smith"/> <ROW Idx="2" FirstName="Isaac" LastName="Larpent"/> </ROWDATA> </DATAPACKET> |