Lazarus Zeos 6.6.6 Access violation

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
kri2512
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 02.03.2010, 16:03

Lazarus Zeos 6.6.6 Access violation

Post 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
jeremicm
Senior Boarder
Senior Boarder
Posts: 61
Joined: 18.10.2006, 17:07
Contact:

Post by jeremicm »

code looks good to me..
on what line exactly you get access violation?
kri2512
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 02.03.2010, 16:03

Post 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 ?
guidoaerts
Senior Boarder
Senior Boarder
Posts: 93
Joined: 01.07.2009, 16:07

Post by guidoaerts »

kri2512, could you give a copy of the violation message?
dreamsoftmx
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 10.03.2010, 21:05
Location: Mexico

Post by dreamsoftmx »

Hi
This error appears to me:

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

Thanks.
silvioprog
Junior Boarder
Junior Boarder
Posts: 42
Joined: 10.01.2009, 00:34
Location: Brasil
Contact:

Post 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.
Post Reply