Sign in to follow this  

[web] how to establish dsn connection for oracle

This topic is 4483 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

You establish a DSN for Oracle in the same way as any other DSN for use with ASP.

Step 1: Create a System DSN from the Data Sources (ODBC) applet from within Control Panel.

Step 2: From within your ASP code, create a new Connection object:


<%
Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
%>


Step 3: Specify the ConnectionString property of your Connection object as being the name of the System DSN you created in Step 1, like so:


<%
Conn.ConnectionString = "DSN=SystemDSN"
%>


So for example, if you called the System DSN from Step 1 myOracleDB, the complete code to setup a DSN would look like the following:


<%
Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "DSN=myOracleDB"
%>


Hope that helps.

Share this post


Link to post
Share on other sites

This topic is 4483 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this