Firebird+Zeos+Delphi 7 - Problem with EAccessViolation

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Merla
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 24.02.2009, 14:14

Firebird+Zeos+Delphi 7 - Problem with EAccessViolation

Post by Merla »

Hey all,

Trying to install Firebird with Zeos, so far so good. I'm using Delphi 7 and I'm quite new to all this, so I need your help.

I've added a TZConnection, TZQuery, TDBGrid and a TDatasource to my Delphi form.

Everything looks fine, but when I try to run it I get the following error "Project1.exe raised exception class EAccessViolation with message 'Access violation at address 000000000. Read of address 000000000'.

The db looks fine, created different ones in both FB Maestro as well as Firebird's ISQL - but I get the same error in Delphi.

Where's the problem?

The database loads up as it should in the TDBGrid.
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post by seawolf »

Hi,
first of of all which Firebird version are you using?
If you use firebird 2.0.5 this is a known error which is currently under investigation.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Merla,

I understand this is working at development time but not at runtime? In this case you should make sure you're not using 2 different firebird libraries. I think there's one lib (the interbase version, I believe) installed by Delphi and maybe an other one for your firebird installation.

Mark
Image
wjl
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 08.03.2009, 11:31
Location: Prescot

Access violation in Delphi ...

Post by wjl »

:D Hi,
The problem you are having is probably because you are trying to access the database components before they have been created ... A typical instance would be if you use a separate data module and then refer to the module before it has been created. If you are using a data module, check that there is nothing in the main form (e.g. OnCreate, OnShow which is referencing the database module ... this will cause just the error you mention - I know I have done it myself enough times before to recognise the problem!
If this is the problem, one solution is to simply change the order in which the forms are created ... go into Project options and make sure that the data module is created before the main form (move the data module to before the creation of the main form - in Windows just use 'drag and drop'.
As I say I have had this happen a number of times in the past and have always traced the problem to the same cause ... trying to access a component / object before it has been initialised.
Hope this is of some help!
Post Reply