Forum > Databases

Can´t write in Firebird

(1/1)

Ati:
Hi,

i want to write a little simple program which save three dates in a Firebird-DB. I have a trigger which before insert the ID by one increases. After i clicked the Save-Button the ID is increased by one but the table is empty??????????? I properties seems to be correctly. Here is my Code:

--- Code: ---procedure TForm1.Button1Click(Sender: TObject);
begin
  qrmain.SQL.Text:='Insert into test (PLZ,ORT,TOUR) VALUES ('''+ed1.Text+''','''+ed2.Text+''','''+ed3.Text+''');';
  qrmain.ExecSQL;
end;
--- End code ---

I don´t found any error. Can you help me??

Sorry for my bad english

Marc:
I'm not sure if FB uses transactions by default, so maybe you need to commit your data

Ati:
That´s right Marc. I found the right Thread in this forum. Here is the right code

--- Code: ---qrmain.SQL.Clear;
  qrmain.SQL.Text:='Insert into test (PLZ,ORT,TOUR) VALUES ('''+ed1.Text+''','''+ed2.Text+''','''+ed3.Text+''');';
  qrmain.ExecSQL;
  trmain.Commit;
--- End code ---


Thank´s

Navigation

[0] Message Index

Go to full version