 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
ari Guest
|
Posted: Tue Nov 18, 2003 9:57 am Post subject: how to share a DataSetProvider? |
|
|
hi,
How to use some ClientDatasets share one DataSetProvider? And safety do some
update data?
I use some code like follow, though it works right, but it seems not so
well, can i do it by some better ways?
procedure TForm1.Button1Click(Sender: TObject);
begin
SQLDataSet1.CommandText := 'Select * From Product';
SQLDataSet1.Active := True;
ClientDataSet1.Close;
clientDataSet1.Open;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
SQLDataSet1.CommandText := 'Select * From Moneys';
SQLDataSet1.Active := True;
ClientDataSet2.Close;
clientDataSet2.Open;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
ClientDataset2.SaveToFile('d:aaa.bat');
ClientDataset2.Close;
SQLConnection1.CloseDataSets;
SQLDataSet1.Close;
SQLDataSet1.CommandText := 'Select * From Moneys';
ClientDataset2.Open;
ClientDataset2.LoadFromFile('d:aaa.bat');
ClientDataset2.ApplyUpdates(0);
end;
regards,
Ari
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|