Good afternoon.
IIS 6.0. DB was created with MSO 2003, though we are now using MSO 2007.
Using vbscript, and getting the following error.
ADODB.Recordset error '800a0e78' Operation is not allowed when the object is closed.
Code:
GuestCheckout VisitsID
Sub GuestCheckout(x)
Dim cnn, rs, strSQL
Set cnn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
Call cnn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../list.mdb"))
strSQL = "UPDATE visits SET CheckoutDate = '" & now() & "' WHERE [visits.id] = " & x & ""
x = ""
rs.Open strSQL, cnn
rs.Close() <--- THIS IS THE ERROR LINE
Set rs = Nothing
End Sub
I am running into this a lot. I open a rs, use it and post some data, then try and close it but am told the object is closed. If I try and re-open the same rs with a different query I am told I can not use the object. Ideas?