DatabaseDesc Object
The DatabaseDesc object provides information about a particular database.
If you already know which database to log on to, you do
not need to obtain a DatabaseDesc object to log on to the database. However,
suppose that you want to have a logon window that presents to the user a list
of the available databases. You can call the Session object's GetAccessibleDatabases
method, which returns a list of DatabaseDesc objects.
When you have a DatabaseDesc object, you can:
- Find the name of a particular database by using the
GetDatabaseName
method. - Find the name of the database set of which the database
is a member by using the
GetDatabaseSetName
method. - Get a "direct connect" string by using the
GetDatabaseConnectString
(ODBC experts can use this string to log on to the database) method.
You can also use a DatabaseDesc object inside a hook. In
this case, you would call the Session object's GetSessionDatabase
method
to retrieve the DatabaseDesc object that has information about the current
database.