OpenDatabase Function (Professional Edition Only)
See Also Example
Description
Opens an existing database
Syntax
OpenDatabase( dbname [, exclusive [, readonly [, connect ]]] )
Remarks
The OpenDatabase function has these parts:
Part Description
dbname A string expression that is the name of an existing database. It can be a fully qualified path, such as C:\MYDB.MDB. The file extension, if applicable, is required. If your network supports it, you can also specify a fully qualified network path, such as:
\\MYSERVER\MYSHARE\MYDIR\MYDB
exclusive A Boolean expression. If True, the database opens for exclusive (single-user) access and if False, the database opens for multiuser access. The default is False.
readonly A Boolean expression. If True, the database opens for read-only access and if False, the database opens for read/write access. The default is False.
connect A string expression used for opening the database.
If dbname refers to a database that is already open for exclusive If you specify exclusive use and another user already has the database open, an error occurs.
If dbname is an empty string and connect is "ODBC;" then a dialog box listing all registered ODBC data source names appears, allowing the user to select a database.
For more information about ODBC drivers such as SQL Server or Oracle, see the Help file provided with the driver.
Possible settings for the supported database formats are:
Database format | DatabaseName | Connect |
Microsoft Access | drive:\path\filename | (none) |
dBASE III | drive:\path | dBASE III; |
dBASE IV | drive:\path | dBASE IV; |
Paradox | drive:\path | Paradox; |
Btrieve | drive:\path\file.DDF | Btrieve; |
FoxPro 2.0 | drive:\path | FoxPro 2.0; |
FoxPro 2.5 | drive:\path | FoxPro 2.5; |
ODBC | data source name or an empty string ("") | ODBC; DSN=server; DATABASE=defaultdatabase; UID=user; PWD=password; LoginTimeout=seconds |