Error
Hi
I'm trying to connect to an sql database and retrieve data. I'm getting the folloring error message:
ADODB.Recordset error '800a0e7d'
Operation is not allowed on an object referencing a closed or invalid connection.
The code used is as follows:
<%
dim cn,strconn
Response.AddHeader "Pragma", "No-Cache"
Response.CacheControl = "private"
Response.Expires=-1
Response.Buffer=true
strconn="DSN=DSNop210440b;" & _
"Uid=op210440b;" & _
"Pwd=50405258"
set cn = Server.CreateObject("ADODB.connection")
On Error Resume Next
For i=1 to 3
If cn.State=adStateClosed Then
cn.Open strConn
Else
Exit For
End If
Next
On Error GoTo 0
Response.Expires=0
Session.Timeout = 60
%>
Thanks
Kel
|