Subject | Re: [IBO] Databasename and aliasname. |
---|---|
Author | rlssv |
Post date | 2003-08-08T13:42:49Z |
Well, I use the BDE-alias for conveniency not really for converting.
My app. is new and uses IBO's Tdataset components (because I am used
to that, and I am using Infopower-controls).
BUT I do also use an older reporting-utility connecting to the db via
BDE, so I can't right now get rid of it!
One more thing is that the user has 3 (or more) similar databases
which is distinguished by the BDE-alias. Therefore it seemed
reasonable to just let TIBOdatabase get the servername, path and
database from BDE, which I thought was the *only* implication of
using Aliasname. What kind of trouble can it cause, I don't know of
any (so far).
My app. is new and uses IBO's Tdataset components (because I am used
to that, and I am using Infopower-controls).
BUT I do also use an older reporting-utility connecting to the db via
BDE, so I can't right now get rid of it!
One more thing is that the user has 3 (or more) similar databases
which is distinguished by the BDE-alias. Therefore it seemed
reasonable to just let TIBOdatabase get the servername, path and
database from BDE, which I thought was the *only* implication of
using Aliasname. What kind of trouble can it cause, I don't know of
any (so far).
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 12:54 PM 8/08/2003 +0000, you wrote:
> >Hi I am using TIBOdatabase, and the ability to read a BDE-alias.
>
> Please don't use this! It doesn't behave the way you think it
does. It is
> there for one and only one purpose: when you are converting a BDE
app to
> IBO, you can enter an existing BDE alias there IN DESIGN-TIME ONLY
and have
> IBO read in the connection info from the idapi.cfg file. It causes
a lot
> of trouble. Just leave AliasName nil!!!
>
> >When the user is prompted for username/password (LogInPrompt=true)
> >the Database-field is blank. How can I set this so the user knows
> >which DB he is logging into.
>
> Set the properties Path, Server and Protocol.
>
> in Path, type the server-local path string (d:\data\mydatabase.gdb)
> in Server, type the host name of the server machine. Just the name
of the
> server, no symbols or anything else.
> in Protocol, select the network protocol the client will use to
connect to
> the database (cpTCP_IP recommended).
>
> Once all of these properties are set, you can optionally then go up
to the
> DatabaseName property and change it to a "developer-friendly" name
like
> DB. You'll find this is a lot easier to work with in your code.
IBO
> always "does the right thing" with the three main connection
properties, so
> you'll see the database connection string displayed correctly for
the
> selected protocol, in the fields of the login prompt.
>
> You can be more flexible than this, if you need to. Often it can
suit your
> needs better to assign the Path, Server and Protocol properties in
the
> FormCreate event of the unit where you are constructing your
connection
> object (TIBODatabase in your case). You might have some popup
before this
> where you let the user select a database to connect to, a role,
whatever.
>
> Helen