Quantcast
Channel: Classic ASP
Viewing all articles
Browse latest Browse all 488

Classic ASP Connection string for Oracle 11g

$
0
0

we are running Windows Server 2008R2 64-bit (IIS 7.5) and our website is running okay with oracle client 8.

However we are in the process of upgrading our oracle database to 12g therefore we have to configure our website.

we have installed the Oracle 11.2.0.3 64bit client and the TNSNames.ora is configured and we can connect to our database using SQLPlus.

When we try to run our Classic ASP web page that connects to Oracle we receive the following error

80004005|Oracle_client_and_networking_components_were_not_found

Sample of the code is below

=============================

<%@LANGUAGE="VBSCRIPT" %>
<!DOCTYPE html>
<html>
<body>
<%
Session.CodePage=65001

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=MSDAORA;Data Source=xxxxxxxxx;User Id=xxxxxxx;Password=xxxxxx;"

sql="select emp_empno from employees where branch=123 " 

Set rs = conn.Execute(sql)

Do While Not rs.EOF
Response.Write "<tr>"
response.write("<td>" & rs(0) & "</td>")
Response.Write "</tr>"
rs.MoveNext
Loop

rs.close
conn.close

%>

============================

if we change the following code   

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=M;Data Source=xxxxxxxxx;User Id=xxxxxxx;Password=xxxxxx;"

to

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=OraOLEDB.Oracle;Data Source=xxxxxxxxx;User Id=xxxxxxx;Password=xxxxxx;"

then we receive this error

800a0e7a|Provider_cannot_be_found

In the Application Pool of IIS the following attributes apply: 

  •  Set "Enable 32 bit Applications" to true, in the "Advanced Settings"

Do we also need to install Oracle 11.2.0.3 32bit client as well? Also, do we have to configure anything else to make it work?

any help will be greatly appreciated 

with regards,

Deborah


Viewing all articles
Browse latest Browse all 488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>