User`s guide

Oracle ODBC for Windows
2-47
6
Click Test Connection to test the connection to your database. The Oracle ODBC
Driver Connect dialog box opens. If you are establishing the data source with
Windows authentication, the Testing Connection dialog box opens.
7
Your database name and user name are automatically entered in the Service Name
and User Name fields. Enter your password in the Password field. Click OK. If
your computer successfully connects to the database, this message appears in the
Testing Connection dialog box: Connection successful. Click OK.
8
Click OK in the Oracle ODBC Driver Configuration dialog box. The ODBC Data
Source Administrator dialog box shows the ODBC data source ORA.
After you complete the data source setup, connect to the Oracle database using the
command line with the native ODBC connection.
Step 4. Connect using the native ODBC connection command line.
1
To connect with Windows authentication, connect to the database with the
authenticated ODBC data source name and with a blank user name and password.
For example, the following code assumes you are connecting to a data source named
Oracle_Auth.
conn = database.ODBCConnection('Oracle_Auth','','');
Or, to connect to your database without Windows authentication, connect to the
database with the ODBC data source name. For example, the following code assumes
you are connecting to a data source named Oracle with user name username and
password pwd.
conn = database.ODBCConnection('Oracle','username','pwd');
2
Close the database connection conn.
close(conn)
See Also
close | database