BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to share a DataSetProvider?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
ari
Guest





PostPosted: Tue Nov 18, 2003 9:57 am    Post subject: how to share a DataSetProvider? Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.