Board index » delphi » Changing BDE settings.

Changing BDE settings.

In order to make network installation of our BDE enabled application easier,
I want to try to make an install routine that would automatically change
some of the BDE settings.  These are:

1.  The LOCAL SHARE setting needs to be set to TRUE.
2.  The NET DIR needs to be set to a particular Drive/directory.
3.  I may (in some cases) need to add an alias with a path setting.

How can I do these things from within our Delphi 3/5 application?

Thanks,
-= Jesse =-
http://www.msdlg.com
http://www.davinci-mims.com

 

Re:Changing BDE settings.


Jesse Castleberry skrev i meldingen ...

Quote
>In order to make network installation of our BDE enabled application easier,
>I want to try to make an install routine that would automatically change
>some of the BDE settings.  These are:

>1.  The LOCAL SHARE setting needs to be set to TRUE.

Don't know about this one. Try:

  MyDatabase.Params['LOCAL SHARE']:='TRUE';

Quote
>2.  The NET DIR needs to be set to a particular Drive/directory.

  Session.NetFileDir:=[path]

Quote
>3.  I may (in some cases) need to add an alias with a path setting.

a) You don't need an alias. With the STANDARD databases (Paradox, dBase), you
may use a path for DatabaseName property of TDatabase and TTable/TQuery
components.

  for i:=0 to MyDatabase.DataSets.Count-1 do
    Datasets[i].DatabaseName:=[SomePath];
  MyDatabase.DatabaseName:=[SomePath];

b) You may create an alias on the fly, I have only succeeded creating a
persistent one myself (although it should be possible to create a temporary
one). I believe Session.AddAlias() does the job, otherwise you may use
DbiAddAlias() BDE API call.

Quote
>How can I do these things from within our Delphi 3/5 application?

I would think this could meet your needs.
Good luck !

--
Bjoerge Saether
Consultant / Developer
Asker, Norway
bsaether.removet...@online.no (remove the obvious)

Re:Changing BDE settings.


There is an excellent article in the Delphi Magazine about preventing
Paradox file corruption. This includes code to change Local Share and other
settings.
Go to the Delphi Magaizine site
http://www.itecuk.com/delmag/

and navigate to the Sample Articles

Mike Best
--
Mike Best Programming
Brisbane
Australia

Quote
Jesse Castleberry <Je...@msdlg.com> wrote in message

news:G_Ts4.62109$ox5.17141297@tw11.nn.bcandid.com...
Quote
> In order to make network installation of our BDE enabled application
easier,
> I want to try to make an install routine that would automatically change
> some of the BDE settings.  These are:

> 1.  The LOCAL SHARE setting needs to be set to TRUE.
> 2.  The NET DIR needs to be set to a particular Drive/directory.
> 3.  I may (in some cases) need to add an alias with a path setting.

> How can I do these things from within our Delphi 3/5 application?

> Thanks,
> -= Jesse =-
> http://www.msdlg.com
> http://www.davinci-mims.com

Other Threads