Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Table existance is checked before Form OnCreate event?
Wed, Sep 24 2008 9:52 PMPermanent Link

Pat
Hi all,

DBISAM v4, Delphi 6 and I use the Session and Database VCL

I have button which opens a REPORT form that I run my reports on. Code
behind the button is

frmMyReports := TfrmMyReports.Create(Application);

Now if a table (needed for one of my reports) is missing from the data
directory I get an Engine Error message (#11010) BEFORE any of the
code on my Report form's OnCreate event is run. The result is once I
close the error message, my Report form does not open at all Frown

So I guess DBISAM checks things before the form is opened. What is the
theory behind this and is there a way for my Report form to still
open?  Do I need to write code myself to check for all the tables'
existance when my application starts?

Thanks.

Regards,
Pat
Wed, Sep 24 2008 10:44 PMPermanent Link

"Robert"

"Pat" <pat@downunder.com> wrote in message
news:63qld4dqgd2cld2mcsqch1rjilnnka86kt@4ax.com...
> Hi all,
>
> DBISAM v4, Delphi 6 and I use the Session and Database VCL
>
> I have button which opens a REPORT form that I run my reports on. Code
> behind the button is
>
> frmMyReports := TfrmMyReports.Create(Application);
>
> Now if a table (needed for one of my reports) is missing from the data
> directory I get an Engine Error message (#11010) BEFORE any of the
> code on my Report form's OnCreate event is run. The result is once I
> close the error message, my Report form does not open at all Frown
>
> So I guess DBISAM checks things before the form is opened. What is the
> theory behind this and is there a way for my Report form to still
> open?  Do I need to write code myself to check for all the tables'
> existance when my application starts?
>

That's normal. The components are created before the OnCreate is fired. Make
sure your tables are not active when you compile the program.

Robert


Thu, Sep 25 2008 4:33 AMPermanent Link

Pat
>That's normal. The components are created before the OnCreate is fired. Make
>sure your tables are not active when you compile the program.

Yep, that did the trick Smile

thanks
Image