
November 19th, 2012, 09:08 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 1
Time spent in forums: 13 m 43 sec
Reputation Power: 0
|
|
|
Help converting ClientDataSet to dfXMLUTF8
It's simple really - I want to open this CDS file(Oops - guess I don't have enough posts to link to content) and save it as an XML file. Here's my code - It's giving an error of "Declaration expected but end of file found"; Thanks for any help!
Code:
unit Script3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DBClient;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
CDS: TClientDataSet;
implementation
procedure TForm1.FormCreate(Sender: TObject);
begin
CDS := TClientDataSet.Create(nil);
try
CDS.LoadFromFile('C:\Master.cds');
CDS.SaveToFile('C:\Master.XML', dfXMLUTF8);
finally
CDS.Free;
end;
end;
|