evaluating ZEOS with Lazarus and a Firebird database, i have a strange access violation on the Open method of TZQuery....
If i do an Insert with the ExecSQL, it works fine.
Can anyone help me ?
I only try to display datas in a TDBGrid.
here is my code :
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
with ZConnection1 do begin
Protocol:='firebird-2.1';
Database:='E:\Projets\Lazarus\LazIDB\IDB.FB';
Hostname:='localhost';
Port:=3050;
User:='SYSDBA';
Password:='masterkey';
Try
Connect;
if Connected then begin
Showmessage('Connexion IDB ok');
end else begin
Showmessage('Connexion IDB ko');
end;
Except on E:Exception do begin
ShowMessage('Erreur : ' + E.Message);
end;
end;
end;
DataSource1.DataSet:=ZQuery1;
DBGrid1.DataSource:=Datasource1;
with ZQuery1 do begin
if Active then Close;
Connection:=ZConnection1;
SQL.Clear;
SQL.Add('select ID_UTILISATEUR from UTILISATEUR');
Open;
end;
end;
Regards,
Christophe