Page 1 of 1

ExecSQL doesn't commit

Posted: 07.07.2011, 22:42
by louishorn
Lazarus v 0.9.29
MySQL 5

I have the ZConnection component set to autocommit.

I have Zquery component named query 1.

My code looks like this

sql := 'UPDATE GRADELINK SET PROVFLAG = 2 WHERE GRADEID = ''104312245|IWAY|10417''';


with query1 do
begin
Active:=False;
SQL.Clear;
SQL.Add(sql);
ExecSQL;
end;


The code runs fine, but it doesn't update the table. It looks like it is not committing the query.

Does anyone have any ideas?

Posted: 08.07.2011, 11:10
by Dali
Have you checked the RowsAffected property afterwards?