grayghost144
Technical User
I am receiving the error
"Operation is not allowed when the object is closed. "
when running the below script. Not sure why.
I have verified the sql statement works using sqlserver 2000 query analyzer. I suspect the statement is erroring with no indication why and therefore the recordset is not open (I could be way off)
The error occurs in the line
If rs2.RecordCount > 0 Then
Any help would be appreciated.
======
"Operation is not allowed when the object is closed. "
when running the below script. Not sure why.
I have verified the sql statement works using sqlserver 2000 query analyzer. I suspect the statement is erroring with no indication why and therefore the recordset is not open (I could be way off)
The error occurs in the line
If rs2.RecordCount > 0 Then
Any help would be appreciated.
======
Code:
<script language=VBScript RUNAT=Server>
dim cn2
dim RS2
Set cn2=Server.CreateObject ("ADODB.Connection")
cn2.open "File Name=C:\Inetpub\[URL unfurl="true"]wwwroot\HD\Scripts\ssidb.udl"[/URL]
Set rs2=Server.CreateObject ("ADODB.Connection")
rs2.open "select * from profile",cn2,1,1
If rs2.RecordCount > 0 Then
rs2.close
cn2.close
set rs2=nothing
set cn2=nothing
end if