Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: DATABASE CONNCTION ERROR


Message #1 by Naeema Mushaimea <nsameeao@y...> on Wed, 18 Apr 2001 22:53:58 -0700 (PDT)
Hi all,

  I try to connect my asp page with oracle database

and got the following error:



((((  ADODB.Recordset error '800a0e7d' 



Operation is not allowed on an object referencing a

closed or invalid connection. 



/cgi-bin/dtc/oracle.asp, line 8   ))))



When I try to create the odbc I found three oracle

driver:

1- Microsoft ODBC for Oracle

2- Microsoft ODBC Driver for Oracle

3- Oracle ODBC Driver

I choose Microsoft ODBC for Oracle and I entered the

required fields (data source name "dsn", description,

User Name, Server), But I didn't see any field ask for

password. So, where I can write the password??



My asp code as follow:



<html>

<head>

<title> Connect to Oracle Database </title>

</head>

<body>

<%

set objCon = server.createobject("ADODB.recordset")

objCon.open "inetfaims"



set objRS = server.createobject("ADODB.recordset")

sql = "Select * from inet_pc1"

objRS.open sql,objCon,1,3



if not objRS.eof then

   response.write "<table

width='100%'><tr><td>Lpo</td><td>Name</td><td>mailing

date</td></tr>"

   while not objRS.eof

          response.write "<tr><td>" & objRS("lpo") &

"</td><td>" & objRS("name") & "</td><td>" &

objRS("mail_date") & " </td></tr>"

          objRS.movenext()

   wend

   response.write "</table>"

end if

%>

</body>

</html>



Anybody can help me to solve the oracle connection

problem. Please!!!



Naeema



Message #2 by "Charles Feduke" <webmaster@r...> on Thu, 19 Apr 2001 08:42:27 -0400
> set objCon = server.createobject("ADODB.recordset")

> objCon.open "inetfaims"



	I'm not sure what the Oracle ODBC driver is looking for, but try...



	objCon.Open "DSN=inetfaims;UID=user_name;PWD=password"



- Chuck


  Return to Index