Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does isOpen() work with VBScript??

Status
Not open for further replies.

finsys

Programmer
Jan 31, 2002
56
GB
I've got stuck in the middle of an app with the isOpen() method. I'm using VBScript to create the ASP and one of the recordsets used on the page is only opened conditionally on parameters passed to the page.

Writing tidy code, I put in a rs2.close at the end of the script and when run it rightly it points out it can't close and object that's not been opened!

So I put in a condition
Code:
if rs2.isOpen()=True then
   rs2.close
end if

but I then get:

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'isOpen'

/report_selection.asp, line 151

Heyulp!!!
 
Thank you cbokowski!!!! That worked spot on.

so even though .isOpen is in the Interdev documentation on MSDN, it's not part of VBScript... grrrrr
 
isOpen is a method of the recordsetDTC. Have a look in the RECORDSET.ASP file in the _ScriptLibrary.

You will find that the isOpen method is implemented by the _RS_isOpen() function, which tests the 'state', as well as other things, of the underlying ADO recordset object. (Content Management)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top