Thread: table update
View Single Post
  #1  
Old 12-04-2006, 02:20 AM
Bharathi Bharathi is offline
Senior Member
 
Join Date: Oct 2006
Posts: 120
Default table update

i try to update the age for fields ID=100;

i try this code

table1.open;
no:= table1.RecordCount;
table1.first;
while i:=0 to no do
begin
if table1.locate('ID',currID,[]) then
begin
table1.edit;
table1AGE.text:=Age;
table1.post;
end;
table1.next;
end;
table1.refresh;


but it updates only the first record for Particular ID . it not upadtes the second record.

i have my table structure like this(its example data,ny table has different data )

ID Age
100 12
100 12
101 33
101 33
100 12
100 12

how do update the Age field for a particular ID.
Reply With Quote