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.
Firebird+Zeos+Delphi 7 - Problem with EAccessViolation
Moderators: gto, cipto_kh, EgonHugeist
Access violation in Delphi ...
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!
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!