ADO » Connection » DefaultDatabase

string = connectionobject.DefaultDatabase
connectionobject.DefaultDatabase = string

Sets or returns a string value that is the default name of the database available from the provider for a Connection object.

The DefaultDatabase property is used to set or return a string value that is the default database for a specific server-side connection. This property cannot be used with a client-side connection (Remote Data Service). Even if a default database is set, you may still open connections that access other databases.


objConnection.DefaultDatabase = "GuruDB"
objRecordset.Open "Chants", objConnection

This example opens the Chants table in the GuruDB database

See Also: