Firstly, let me apologise if this topic has been covered before elsewhere. I have searched but been unable to find information I require.
I am a newcomer to MySQL as I have always found the BDE to do everthing I wanted.
I am attempting to edit and add data to a table but keep getting an 'Update failed. Found 0 records' error when trying to edit a record that should already exist.
Am obviously doing something stupid but need help.
Delphi 2007, Win 7 64-bit
Code fragment:
with MyTable1 do
begin
TableName := 'm10';
SQL.Clear;
Open;
rc := RecordCount;
Last;
if flag or (rc = 0) then
Append
else
Edit;
flag := False;
FieldByName('Date_Time').AsDateTime := dt;
FieldByName('Count').AsInteger := Count[2];
for c := 1 to 32 do
FieldByName('ch'+IntToStr(c)).AsFloat := Average[c];
Post;
Close;
end;
Any help would be appreciated. Thank you in advance.
MyTable - Error trying to edit records
-
AndreyZ
Such error occurs when no records were updated on a server. Please try setting the MyTable1.Debug property to True. The Debug property is used to display the exact statement that is being executed, all its parameters' values, and the type of parameters. This will help you to find the reason of this error.