Firebird gets disconnect after a query
Posted: 17.05.2009, 20:02
hi guys ,
I´am using lazarus 0.9.26.2 and the latest Zeos DB from svn and Firebird 2.1 .
I´ve made a little app to test it and all works fine until
I add or delete a record ,NOT using the TDBNavigator then
the app disconnect from the database ....
The code that I use using a BitBtn is :
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
with zquery1 do begin
Close;
SQL.Clear;
SQL.Add('INSERT INTO zona (id_zona, zona_descrip , comentarios_zona ) VALUES(');
SQL.Add('''' + edit1.Text + ''',''' + edit2.text + ''',''' + memo1.text + ''')');
ExecSQL;
Close;
end ;
end;
I've tested tht zeos component with a Mysql and the results are the same :
What Can I add to keep the connection to the database ?
Is it a bug in ZeosDB ?
when I use the TDBNavigator all works fine .
Thanks in advance ,
Regards
Rick
I´am using lazarus 0.9.26.2 and the latest Zeos DB from svn and Firebird 2.1 .
I´ve made a little app to test it and all works fine until
I add or delete a record ,NOT using the TDBNavigator then
the app disconnect from the database ....
The code that I use using a BitBtn is :
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
with zquery1 do begin
Close;
SQL.Clear;
SQL.Add('INSERT INTO zona (id_zona, zona_descrip , comentarios_zona ) VALUES(');
SQL.Add('''' + edit1.Text + ''',''' + edit2.text + ''',''' + memo1.text + ''')');
ExecSQL;
Close;
end ;
end;
I've tested tht zeos component with a Mysql and the results are the same :
What Can I add to keep the connection to the database ?
Is it a bug in ZeosDB ?
when I use the TDBNavigator all works fine .
Thanks in advance ,
Regards
Rick