Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle 8.1.7 connection and ASP
Try this code to open your Connection:
myconn= Server.CreateObject("ADODB.Connection"); myconn.ConnectionTimeout = 15; myconn.CommandTimeout = 30; myConnString="Provider=MSDAORA;Password=pcinv;User ID=pcinv;Data Source=yourtnsnamesentry;" myconn.ConnectionString=myConnString myconn.Open;
This uses a DSN-less connection which is a better and more efficient way to connect..
hth,
"Tha DRD" <thadrd_at_hotmail.com> wrote:
>To all interested,
>
>I am trying to run Crystal Reports via ASP through an Oracle 8.1.7
>connection. Every time I try to run the webpage, I get the following
>error displayed on the page:
>
>Error Occurred Reading Records: Logon failed. Details:
>28000:[Oracle][ODBC][Ora]ORA-01005: null password given; logon denied
>
>I have entered our connection information numberous ways into our ASP
>code and gotten the same results. I have also tried the Microsoft
>driver that everyone claims to work (ver 2.0). I am wondering what I am
>doing wrong. Below is the ASP code.
>
><%_at_LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><!DOCTYPE HTML PUBLIC
>"-//W3C//DTD HTML 4.01 Transitional//EN"
>"http://www.w3.org/TR/html4/loose.dtd">
>
><%
>Set OraDatabase = Server.CreateObject("ADODB.Connection")
>OraDatabase.Open "dsn=zfdprod;uid=pcinv;pwd=pcinv;"
>%>
>
><% Response.Expires = 0 %>
>
><html>
>
><head>
><title>Report Viewer</title>
></head>
>
><%
>ReportName = Request.QueryString("rpt")
>cCom = Request.QueryString("com")
>CSel = Request.QueryString("sel")
>
>Server.ScriptTimeout = 180
>%>
>
><!-- #include file="AlwaysRequiredSteps.asp" -->
>
><%
>session("oRpt").ReportComments = cCom
>session("oRpt").RecordSelectionFormula = cSel
>%>
>
><!-- #include file="MoreRequiredSteps.asp" -->
><!-- #include file="SmartViewerActiveX.asp" -->
></html>
>
>I will be eternally greatful to anyone that has the solution!
>Thanks,
>Derek
Received on Wed Aug 25 2004 - 14:01:02 CDT