Subject | Re: [IBO] Databasename and aliasname. |
---|---|
Author | Helen Borrie |
Post date | 2003-08-08T13:26:24Z |
At 12:54 PM 8/08/2003 +0000, you wrote:
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!!!
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
>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)Set the properties Path, Server and Protocol.
>the Database-field is blank. How can I set this so the user knows
>which DB he is logging into.
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