Failing to update
Posted: Tue 31 May 2005 15:28
Using Delpi 7 professional and you component :
I traing to update a file into a table of 462289 row using this code:
##############################################
procedure TForm2.Button2Click(Sender: TObject);
var
numero: integer;
begin
numero:=0;
mytable1.First;
while MyTable1.Eof = false do
begin
numero := numero+1;
MyTable1.Edit;
MyTable1.FieldByName('codice').AsInteger := numero;
MyTable1.Post;
MyTable1.Next;
end;
end;
###############################################
I receive the following error:
EdatabaseError whit message "update failed. found 4 records"
Il re-number the first 3 rows but no more!
Coult you tell me whot happen?
I traing to update a file into a table of 462289 row using this code:
##############################################
procedure TForm2.Button2Click(Sender: TObject);
var
numero: integer;
begin
numero:=0;
mytable1.First;
while MyTable1.Eof = false do
begin
numero := numero+1;
MyTable1.Edit;
MyTable1.FieldByName('codice').AsInteger := numero;
MyTable1.Post;
MyTable1.Next;
end;
end;
###############################################
I receive the following error:
EdatabaseError whit message "update failed. found 4 records"
Il re-number the first 3 rows but no more!
Coult you tell me whot happen?