TClientDataSet[18]: OptionalParam


TClientDataSet[18]: OptionalParam


uses XMLDoc;



procedure TForm1.FormCreate(Sender: TObject);

begin

  with ClientDataSet1 do begin

    FieldDefs.Add('Text', ftString, 12);

    FieldDefs.Add('Num', ftInteger);

    CreateDataSet;

    AppendRecord(['ABC', 123]);

  end;

  Memo1.Text := FormatXMLData(ClientDataSet1.XMLData);

end;



procedure TForm1.Button1Click(Sender: TObject);

begin

  ClientDataSet1.SetOptionalParam('ParamX', 12345);

  Memo1.Text := FormatXMLData(ClientDataSet1.XMLData);

  ShowMessage(ClientDataSet1.GetOptionalParam('ParamX'));

end;


 
   

你可能感兴趣的:(client)