How to use TpgQuery.AutoCommit properly?
Posted: Thu 04 Feb 2016 08:46
Hello,
first of all I wanted to report that help is missing information about the AutoCommit property. Could you explain a little how this property works because when I use this code:
The query still inserts one row into the table. I would expect that the row will not be inserted because AutoCommit is false.
Regards.
first of all I wanted to report that help is missing information about the AutoCommit property. Could you explain a little how this property works because when I use this code:
Code: Select all
PgQuery1.SQL.Text := 'INSERT INTO master (device_id, type) VALUES(:P_device_id, :P_type');
PgQuery1.Connection.Connected := True;
PgQuery1.AutoCommit := False;
PgQuery1.Params[0].Value := 101;
PgQuery1.Params[1].Value := 'some text';
PgQuery1.ExecSQL;
Regards.