Board index » delphi » Alias creation without BDE Config?!

Alias creation without BDE Config?!

Hi!
Please give me a piece of advice about HOW CAN I CREATE
A NEW ALIAS WITHOUT STANDARD BDE CONFIGURATION UTILITY.
It's a necessary thing, e. g., for installation program.
I write a DB Application; then, I want to make an
installation utility, which will, except everything
else, update existing IDAPI.CFG with new aliases.
I don't want to say users: "Create the alias named XXX via BDE
Config"! They will be afraid of it, because they don't
know English. So what shell I do?  
And I must note, that new aliases for DB apps must include
not only native Borland-Standard-driver-based, but
ODBC-based ones too.
Thanks very much.
--
Leonid Schavelev.
Ivanovo, RUSSIA.
http://www.polytech.ivanovo.su/~leonid
MailTo:leo...@polytech.ivanovo.su

 

Re:Alias creation without BDE Config?!


Hi Leonid,

Quote
You wrote:
> Please give me a piece of advice about HOW CAN I CREATE
> A NEW ALIAS WITHOUT STANDARD BDE CONFIGURATION UTILITY.
> It's a necessary thing, e. g., for installation program.
> I write a DB Application; then, I want to make an
> installation utility, which will, except everything
> else, update existing IDAPI.CFG with new aliases.
> I don't want to say users: "Create the alias named XXX via BDE
> Config"! They will be afraid of it, because they don't
> know English. So what shell I do?
> And I must note, that new aliases for DB apps must include
> not only native Borland-Standard-driver-based, but
> ODBC-based ones too.
> Thanks very much.

Creating ODBC data source names (DSNs) programatically is a
breeze! You can even install the necessary ODBC driver in the
same way if you need to.  Use the CreateDSN() API call to do
the magic (see our site below for a Delphi wrapper on the
ODBC API).

Regards,

Rob
--
Rob McGillivray
Software Development Manager
DataSoft - "Voted Top Development House in South Africa - 1994"
ODBCExpress: the top ODBC data access tool for Delphi,
http://www.odbcexpress.com

Re:Alias creation without BDE Config?!


Quote
Leonid Schavelev wrote:

> Hi!
> Please give me a piece of advice about HOW CAN I CREATE
> A NEW ALIAS WITHOUT STANDARD BDE CONFIGURATION UTILITY.

[snip]

  Just don't use one...  Set everything up as normal, and then load the
table at run-time...  Then you won't need an Alias...

--
Jason
E...@DarkElf.reno.nv.us

Re:Alias creation without BDE Config?!


Quote
Jason Wallace wrote:

>   Just don't use one...  Set everything up as normal, and then load the
> table at run-time...  Then you won't need an Alias...

> --
> Jason
> E...@DarkElf.reno.nv.us

OK, Jason, I see you point. I can create a new alias with
DBIAddAlias function (at least I found it). But how to
behave with ODBC-based aliases? To create them I must  
point to the driver name (not NIL - ODBC drivers aren't
standard ones for IDAPI). But, in general, I didn't find
any function which is able to create and insert into CFG
new DRIVER.

So, I change my question: how do Borland do it in BDECFG?
Maybe, somebody know, how to insert new ODBC drivers in
IDAPI configuration file at run-time?
Thanks in advance.
--
Leonid Schavelev.
Ivanovo, RUSSIA.
http://www.polytech.ivanovo.su/~leonid
MailTo:leo...@polytech.ivanovo.su

Re:Alias creation without BDE Config?!


Quote
Leonid Schavelev <leo...@polytech.ivanovo.su> wrote:
>Hi!
>Please give me a piece of advice about HOW CAN I CREATE
>A NEW ALIAS WITHOUT STANDARD BDE CONFIGURATION UTILITY.
>It's a necessary thing, e. g., for installation program.

The Delphi FAQ at http://proxy.sbrain.syh.fi/delphi/delphi_faq.html
has an entry 2.3.3.1 regarding this problem

////////////////////////////////////////////////////////////////////
Argue for your limitations                      Mats Andersson  
and you can be sure to keep them                Jakobstad
                Donald Shimoda                  FINLAND 967-7236 105
/////////////////////////////////////////////////////////////////////

Re:Alias creation without BDE Config?!


Quote
Leonid Schavelev wrote:
> Please give me a piece of advice about HOW CAN I CREATE
> A NEW ALIAS WITHOUT STANDARD BDE CONFIGURATION UTILITY.
> It's a necessary thing, e. g., for installation program.

First suggestion:  Use a professional installation program instead of
writing one yourself.  Not just because of aliases.  A good install is
very difficult to write.

Second:  Look on the Delphi 2 CD for BDE.HLP.  This is the help file
for the BDE API.  Most of the functions are available under Delphi 1.0
(that's what we're still using).  Take a look at the function
DbiAddAlias.

Jon

Other Threads