ADO Interface

Instant ASP provides an ADO interface that allows you to access a database through the JDBC driver. To set the connection string, use the following general syntax:

"Driver=drivername;URL={http://www.myURL.com};UID=username;PWD=password;"

Parameter

Description

Driver Certain drivers convert client JDBC calls to DBM. Each driver must supply a class that implements the Driver interface.
URL JDBC URL-a database url of the form jdbc:subprotocol:subname.
UID The user name of the database on whose behalf the Connection is being made. 
PWD User's password of the database.
For example: 
Dim con
Dim conString
conString =  "Driver=oracle.jdbc.driver.OracleDriver;URL={jdbc:oracle:thin:@192.9.200.111:ORCL};
UID=SCOTT;PWD=TIGER;
set con = Server.CreateObject("ADODB.Connection")
con.Open(conString)

NOTE: You must set your CLASSPATH to include the path of the driver file containing the java classes that implement the driver.

For example, if the connection string is: "Driver=oracle.jdbc.driver.OracleDriver;URL={jdbc:oracle:thin:@192.9.200.111:ORCL};UID=SCOTT;PWD=TIGER;",
then you must set your CLASSPATH to include the path of the zip file containting the class files of "oracle.jdbc.driver.OracleDriver."

Additionally, if you are using "JDBC-ODBC bridge" as your driver type, you don't have to set the driver files in your CLASSPATH, but you must register your database then connect the database by using the following general syntax:

"DSN=Datasource name;UID=UserID;PWD=Password;"

Parameter

Description

DSN The Data Source Name registered on ODBC .
UID The user name of the database on whose behalf the Connection is being made.
PWD User's password of the database. 

 

ODBC.INI Interface

Like ODBC manager, instant ASP provides an interface that allows you to register DSN(Data Source Name) through the ODBC.INI file for your ASP pages on any platform, it locates under iasp_root\properties folder. 

For example: if you want to connect an ORACLE database with JDBC Driver
(oracle.jdbc.driver.OracleDriver), but you want to keep use DSN to
connect the database, suppose your ASP page has following codes.

Dim con
set con = Server.CreateObject("ADODB.Connection")
con.Open("DSN=DATABASE1")
con.Open("DSN=DATABASE2;UID=SCOTT;PWD=TIGER")
And then you can register the DSN in the ODBC.INI as following:

[DATABASE1]
Driver=oracle.jdbc.driver.OracleDriver
URL={jdbc:oracle:thin:@192.9.200.111:ORCL}
UID=SCOTT
PWD=TIGER
[DATABASE2]
Driver=oracle.jdbc.driver.OracleDriver
URL={jdbc:oracle:thin:@192.9.200.111:ORCL}

If you encounter any problems or errors, please contact support@halcyonsoft.com.


Copyright © 1998-2000, Halcyon Software Inc. All rights reserved.