Additional CONNECT Syntax
Go Up to Opening a Database
CONNECT
supports several formats for opening databases to provide programming flexibility. The following table outlines each possible syntax, provides descriptions and examples, and indicates whether CONNECT
can be used in programs that access single or multiple databases:
Syntax | Description | Single access | Multiple access |
---|---|---|---|
|
Opens a single, hard-coded database file, <dbfile>. Example:
|
Yes |
No |
|
Opens the database file associated with a previously declared database handle. This is the preferred Example:
|
Yes |
Yes |
|
Opens a hard-coded database file, <dbfile>, and assigns a previously declared database handle to it. Example:
|
Yes |
Yes |
|
Opens the database file stored in the host-language variable, <varname>, and assigns a previously declared database handle to it. Example:
|
Yes |
Yes |
For a complete discussion of CONNECT
syntax and its uses, see the Language Reference Guide.