PHP append to ClientDataSet CDS File

一曲冷凌霜 提交于 2019-12-05 16:59:38

I recommend you to not write direct to the cds files.

Instead you can use a common xml for both applications (PHP and Delphi) and on the delphi side you load and save it using XML Transformation with TXmlTransformProvider and on the PHP side you just write it to the XML as you always do.

Take a look here on how to setup on delphi.

--UPDATE

If you realy need to change direct the cds file (using xml format) you can just add a new to the cds file considering the cds format is xml like this:

<?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>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!