Jump to content
  • Advertisement
Sign in to follow this  
ballack

[web] how to establish dsn connection for oracle

This topic is 4702 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

hi everyone i want to know how to set a dsn for oracle. so that i can access oracle database using asp. thank you in advance.

Share this post


Link to post
Share on other sites
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!