Subject Re: [IBO] Re: Server name and path for database connection
Author Geoff Worboys
> No, I mean connecting to Interbase server without
> knowing the server computer name and the database path.

In the most recent version of one of my applications I use an API call
which allows you to dynamically determine the location of the ISC4.gdb
database (IB6 only), given the server name.

You can access this function via IB_Session, which is available from
any of the IBO components. eg...

Result := IB_Connection.IB_Session.GetISC4Path(
'MYSERVER', cpTCPIP, 'SYSDBA', 'secret' );

In the ISC4 database I setup a table with fields like "Name" and
"File". Obviously the File field contains the location of the
particular database. The Name is just a user friendly name for the
database.

When the user logs on they get a prompt like..

Username: ______
Password: ______
Database: ______

Where the Database is a drop down list of available database names.
When the user clicks the Logon button I get the ISC4 database path as
shown above, connect to it and then select the "File" for the selected
database name. I then disconnect and connect to the selected database
file.

This allows me to give the user multiple choices. In particular the
client wanted a "Training" database where new users could be trained
and various aspects of the system demonstrated and trialed.

HTH

Geoff Worboys
Telesis Computing