I recommend that you do not write directly to cds files.
Instead, you can use plain xml for both applications (PHP and Delphi) and on the delphi side, which you load and save using XML Transformation with TXmlTransformProvider, and on the PHP side you just write it in XML, as always.
Take a look here on how to configure on delphi.
- UPDATE
If you really need to change the direct cds file (using the xml format), you can simply add a new one to the cds file, given that the cds format is xml:
<?xml version="1.0" standalone="yes"?> <DATAPACKET Version="2.0"> <METADATA> <FIELDS> <FIELD attrname="Name" fieldtype="string" WIDTH="24"/> <FIELD attrname="Capital" fieldtype="string" WIDTH="24"/> </FIELDS> <PARAMS DEFAULT_ORDER="1" PRIMARY_KEY="1" LCID="2057"/> </METADATA> <ROWDATA> <ROW Name="Argentina" Capital="Buenos Aires"/> <ROW Name="Bolivia" Capital="La Paz"/> <ROW Name="Brazil" Capital="Brasilia"/> <ROW Name="Canada" Capital="Ottawa"/> <ROW Name="United States of America" Capital="Washington"/> //Add your new ROW tag here with your data </ROWDATA> </DATAPACKET>
source share