[DUG] Firebird INSERT TIBQuery
johnkbird at paradise.net.nz
johnkbird at paradise.net.nz
Mon Mar 14 13:57:08 NZDT 2011
I am running some routine database where the program on startup interrogates the
database and updates fields if it as an old version. Adding Tables and Fields
works fine.
Also in one case I want to do an INSERT statement and this does now work.
This is using D2007/IB and TIBQuery component, and all commands are executed
using statements like
IBQuery1.SQL.text:='INSERT INTO SECTOR (ID, SECTORDESC) VALUES (1001,'
+Quotedstr(Desc1)+')';
try
IBTransaction1.StartTransaction;
IBQuery1.SQL.Execute;
Status:='OK';
except
Status:='error';
end;
if IBTransaction1.InTransaction then IBTransaction1.commit;
The same structure works for adding a table and ALTER TABLE (adding fields), and
does as expected, but not for the INSERT. The Status is set to OK - the except
is not triggered. But no INSERT is done. As far as I can see all Commits are
done.
Anyone have an idea why the INSERT statements are not working?
John Bird
More information about the Delphi
mailing list