BDE Alias's and new installs of the BDE

BDE Alias's and new installs of the BDE

Post by Tony Ma » Sun, 31 Dec 1899 09:00:00



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

 
 
 

BDE Alias's and new installs of the BDE

Post by Reid Roma » Sun, 31 Dec 1899 09:00:00



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

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

 
 
 

BDE Alias's and new installs of the BDE

Post by Reid Roma » Sun, 31 Dec 1899 09:00:00



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

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

 
 
 

1. BDE install conflicts with previously installed BDE

My application uses just the dBase driver for BDE and using
InstallShield express from Delphi 2.0, I included that BDE
partial install.

Installing to a machine with does not have BDE installed works
fine.  However, trying to install to a machine which *does*
have BDE, there is first a warning that BDE has been detected
and the user is advised to contact the supplier of the
application for a full BDE install.  This warning can be ignored
and the install completes, putting the (partial) BDE files in the
application directory.

Unfortunately, when then trying to run the application (on
Windows/NT), the following fatal error occurs:
   Exception EDatabaseError in
   Module test.exe at 0005:11EB
   An error occured while attempting to
   initialize the BDE (error $2108).

It would seem that somehow my app is trying to start up the
*other* BDE (in my test case, I'm also pretty sure that the
*other* BDE is (much) newer than the partial one I'm installing,
although that may not be the problem).

Since I don't know where the user will install my app, I set the
Database property on start-up, after finding the path where the
app was installed.  I set no aliases in my partial BDE install,
but can't figure out why my app seems to be calling the wrong BDE.

All suggestions are appreciated (and sorry for the lengthy narrative),
Stuart Kohler

2. Informix WGS and two networks adapters

3. New BDE doesn't install correct native driver for Access97

4. CHALLENGE: 1GB tempdb_in_ram

5. Installing ODBC drivers, & setting up BDE aliases

6. Access Upsizing Woes

7. BDE Aliases on Install

8. REQ: HOW TO CALL A MSACCESS REPORT FROM VB4

9. Creating BDE Aliases from an Install Program

10. Creating new aliases in BDE without running BDECFG?

11. Installing BDE 4.0 without removing BDE 2.5

12. InstallShield won't create BDE aliases

13. Don't want to install bde