Hi,
I am trying to connect from ASP to an Oracle 10g database. I got a sample connection string from
I get an error message which I have attached along with this post. It is alert box with the message that says - ""
In the browser, I get the following error:
My code is:
Oracle_DB.asp
Line 7 is:
Note: On my local machine, I have been able to connect to the same database from a JSP page.
Any ideas how to get the connection right from ASP page?
Thanks.
I am trying to connect from ASP to an Oracle 10g database. I got a sample connection string from
I get an error message which I have attached along with this post. It is alert box with the message that says - ""
In the browser, I get the following error:
Code:
The Oracle (tm) client and networking components were not found. These components are supplied by Oracle Corporation and are a part of the Oracle Version 7.3 (or greater) client software installation.
You will be unable to use this driver until these components have been installed.
Code:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
/test/Oracle_DB.asp, line 7
My code is:
Oracle_DB.asp
Code:
<%@Language="VBScript"%>
<%
' Create the Connection Object
Set objConn = Server.CreateObject("ADODB.Connection")
' Set the connection string. Connecting to a SQL Server Database
objConn.open "Driver={Microsoft ODBC for Oracle};Server=skydev;Uid=apps;Pwd=apps;"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] >
<head>
<title>Oracle DB Connection</title>
</head>
<body>
<form name="frmNorthwind" id="frmNorthwind" action="getProductResults.asp" method="post">
<h1>Product Search</h1>
<h4>Search Product</h4><input type=text size=20 id="txtProduct" name="txtProduct">
<input type="submit" name="btnSubmit" id="btnSubmit">
</form>
</body>
</html>
<%
objConn.Close
%>
Line 7 is:
Code:
objConn.open "Driver={Microsoft ODBC for Oracle};Server=skydev;Uid=apps;Pwd=apps;"
Note: On my local machine, I have been able to connect to the same database from a JSP page.
Any ideas how to get the connection right from ASP page?
Thanks.