Board index » delphi » BDE Alias's and new installs of the BDE

BDE Alias's and new installs of the BDE

I've written an app in Delphi 2.01 that is generally to be installed
using Installshield Express onto a machine that does not already have
the BDE.

The app has a new database wizard to create the new database for the
user and then registers an alias for the database.  Next it uses that
new alias to open the database.

When you generate a report, it calls another EXE and passes the alias
name to it as a parameter (exe file got too large <grin>)

IF the software was just installed AND you immediately create an alias
then try to generate a report without first closing and reopening the
program THEN I get "unable to initialize BDE" when I try to run the
second exe and it goes to open the passed alias.

If you've already run the program at least once then close it, open it
and create a new database (and alias) and run the report immediately -
no problem.  Only seems to happen the first time you run the software
after the BDE install.

Why?

I have called SaveConfigFile right after creating the new alias, so I
don't think it's that the alias is not getting written...

 

Re:BDE Alias's and new installs of the BDE


Quote
Tony Maro wrote:

> I've written an app in Delphi 2.01 that is generally to be installed
> using Installshield Express onto a machine that does not already have
> the BDE.

> The app has a new database wizard to create the new database for the
> user and then registers an alias for the database.  Next it uses that
> new alias to open the database.

> When you generate a report, it calls another EXE and passes the alias
> name to it as a parameter (exe file got too large <grin>)

> IF the software was just installed AND you immediately create an alias
> then try to generate a report without first closing and reopening the
> program THEN I get "unable to initialize BDE" when I try to run the
> second exe and it goes to open the passed alias.

> If you've already run the program at least once then close it, open it
> and create a new database (and alias) and run the report immediately -
> no problem.  Only seems to happen the first time you run the software
> after the BDE install.

> Why?

> I have called SaveConfigFile right after creating the new alias, so I
> don't think it's that the alias is not getting written...

What I think might be happening, is that the Registry entries created by
InstallShield for the BDE, have not been re-read by the operating
system..

In these forums there was reference to this:

Topic: Make Registry changes available immediately ......

Quote
Someone wrote:

See the API help file topic 'RegFlushKey'. You should also broadcast
a WM_WININICHANGE message using HWND_BROADCAST to let other apps and
Windows itself know about the change.

Just a guess, but maybe this is the problem..

Hope that helps!

Rkr

--
                   \|||/
                   /'^'\
                  ( 0 0 )
--------------oOOO--(_)--OOOo--------------
. Reid Roman                              .
. Delphi Programmer / Analyst             .
. TVisualBasic:=class(None);              .
. May the Source be With You              .
-------------------------------------------
. Auto-By-Tel (http://www.autobytel.com)  .
. Irvine, CA U.S.A                        .
. E-Mail : rkroman (at) pacbell (dot) net .
. or reidr (at) autobytel (dot) com       .
-------------------------------------------

Re:BDE Alias's and new installs of the BDE


Quote
Tony Maro wrote:

> I've written an app in Delphi 2.01 that is generally to be installed
> using Installshield Express onto a machine that does not already have
> the BDE.

> The app has a new database wizard to create the new database for the
> user and then registers an alias for the database.  Next it uses that
> new alias to open the database.

> When you generate a report, it calls another EXE and passes the alias
> name to it as a parameter (exe file got too large <grin>)

> IF the software was just installed AND you immediately create an alias
> then try to generate a report without first closing and reopening the
> program THEN I get "unable to initialize BDE" when I try to run the
> second exe and it goes to open the passed alias.

> If you've already run the program at least once then close it, open it
> and create a new database (and alias) and run the report immediately -
> no problem.  Only seems to happen the first time you run the software
> after the BDE install.

> Why?

> I have called SaveConfigFile right after creating the new alias, so I
> don't think it's that the alias is not getting written...

What I think might be happening, is that the Registry entries created by
InstallShield for the BDE, have not been re-read by the operating
system..

In these forums there was reference to this:

Topic: Make Registry changes available immediately ......

Quote
Someone wrote:

See the API help file topic 'RegFlushKey'. You should also broadcast
a WM_WININICHANGE message using HWND_BROADCAST to let other apps and
Windows itself know about the change.

Just a guess, but maybe this is the problem..

Hope that helps!

Rkr

--
                   \|||/
                   /'^'\
                  ( 0 0 )
--------------oOOO--(_)--OOOo--------------
. Reid Roman                              .
. Delphi Programmer / Analyst             .
. TVisualBasic:=class(None);              .
. May the Source be With You              .
-------------------------------------------
. Auto-By-Tel (http://www.autobytel.com)  .
. Irvine, CA U.S.A                        .
. E-Mail : rkroman (at) pacbell (dot) net .
. or reidr (at) autobytel (dot) com       .
-------------------------------------------

Other Threads