1. 程式人生 > >delphi 中如何呼叫webservice返回dataset 資料集

delphi 中如何呼叫webservice返回dataset 資料集

We're nearly there. Drop a TClientDataset, a TXMLTransformProvider and a TDatasource on the form. Here's what the form looks like now:

Link the Grid, the Datasource and the ClientDataset, and set the ClientDataset's ProviderName to point to the XML Transform Provider. 7. Set the TransformRead.TransformationFile

 of the XMLTransformProvider to Ziptrans.XTR.

首先先將dataset存成xml檔案,然後利用delphi提供的外部工具 xml mapping tool 將生成的xml檔案轉換成xtr模版檔案。然後根據上述方法設定好各個控制元件的連線。

xml mapping tool 使用方法:1、匯入生成好的xml檔案 file-open 2、在document區域中右鍵選擇 select all 3、選單欄 create--datapacket form xml 4、選單欄 create-transformation  5、選單欄 file--save--transformation 儲存xtr檔案。