Recent

Author Topic: Can´t write in Firebird  (Read 3428 times)

Ati

  • New Member
  • *
  • Posts: 41
Can´t write in Firebird
« on: July 19, 2006, 10:28:34 am »
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: [Select]
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;

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

Sorry for my bad english

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2496
RE: Can´t write in Firebird
« Reply #1 on: July 19, 2006, 11:12:46 am »
I'm not sure if FB uses transactions by default, so maybe you need to commit your data
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Ati

  • New Member
  • *
  • Posts: 41
Can´t write in Firebird
« Reply #2 on: July 19, 2006, 11:21:38 am »
That´s right Marc. I found the right Thread in this forum. Here is the right code
Code: [Select]
qrmain.SQL.Clear;
  qrmain.SQL.Text:='Insert into test (PLZ,ORT,TOUR) VALUES ('''+ed1.Text+''','''+ed2.Text+''','''+ed3.Text+''');';
  qrmain.ExecSQL;
  trmain.Commit;


Thank´s