version 2004
ODBC LOGIN ({dataEntry{; userName{; password}}})
Parameter | Type | Description | |
dataEntry | String | Name of the data source entry in the ODBC Manager | |
userName | String | Name of the user registered in the data source | |
password | String | Password of the user registered in the data source |
Description
The ODBC LOGIN command allows you to connect to an external ODBC data source.
Note: The ODBC (Open DataBaseConnectivity) standard defines a library of standard functions. These functions allow an application like 4th Dimension to accesss any ODBC-compatible data source (databases, spreadsheets, etc.) using SQL.
The dataEntry parameter contains the name of the data source as entered in the ODBC driver manager.
userName contains the name of the user authorized to connect to the external data source. For example, with Oracle®, the user name can be "Scott".
password contains the password of the user authorized to connect to the external data source. For example, with Oracle®, the password can be "tiger".
These parameters are optional; if no parameters are passed, the command will bring up the ODBC Manager dialog box that allows you to select the external data source:
The scope of this command is per process; in other words, if you want to execute two distinct connections, you must create two processes and execute each connection in each process.
Examples
1. This statement will bring up the ODBC Manager dialog box:
ODBC LOGIN
2. This statement will connect to the ODBC data source named "MyOracle" using Scott/tiger as the name/password :
ODBC LOGIN("MyOracle";"Scott";"tiger")
See Also
System Variables or Sets
If the connection is successful, the system variable OK is set to 1; otherwise, it is set to 0.