Page 1 of 1

Lazarus Zeos 6.6.6 Access violation

Posted: 02.03.2010, 16:20
by kri2512
Hello,
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; 
What's wrong with this code ?
Regards,
Christophe

Posted: 03.03.2010, 11:26
by jeremicm
code looks good to me..
on what line exactly you get access violation?

Posted: 03.03.2010, 11:30
by kri2512
Hello,
the access violation occurs on the Open Method of the ZQuery.
I 've read some posts that said that the Firebird version was causing troubles.

i use the latest one.

What do you think of that ?

Posted: 03.03.2010, 20:19
by guidoaerts
kri2512, could you give a copy of the violation message?

Posted: 10.03.2010, 21:16
by dreamsoftmx
Hi
This error appears to me:

"Project zeos.exe raised exception class 'External: SIGSEGV' "
How do I fix it?

Thanks.

Posted: 10.03.2010, 21:47
by silvioprog
Hellow kri2512,

You can connect io designtime? If yes, see if the DLL (fbclient.dll) is in System32.
Start your project with ZConnection disconnected.