Is the following code possible :
with Tclientdataset do
begin
close;
CommandText := ('select * from a);
Open;
First;
while not Eof do
begin
inc(counter);
Tclientdataset.edit;
Tclientdataset.fieldbyname('counter').value :=
counter;
Tclientdataset.applyupdates(-1);
next;
end;
end;
Please don't go into the nitty-gritty detail of this code, this is just a simplified version of the code I have. I just tried to get the point across that is it possible to, while you are looping through a clientset, to update the record that you are standing on. The TClientset is connected to a provider and query.
I am using D7 and DBExpress.
with Tclientdataset do
begin
close;
CommandText := ('select * from a);
Open;
First;
while not Eof do
begin
inc(counter);
Tclientdataset.edit;
Tclientdataset.fieldbyname('counter').value :=
counter;
Tclientdataset.applyupdates(-1);
next;
end;
end;
Please don't go into the nitty-gritty detail of this code, this is just a simplified version of the code I have. I just tried to get the point across that is it possible to, while you are looping through a clientset, to update the record that you are standing on. The TClientset is connected to a provider and query.
I am using D7 and DBExpress.