Do I really need to use RS.close before I
Set RS=Nothing ?
Does this apply to database conneciton as well?
What can be the consequence if I set a RS (or a db connection) to Nothing directly without closing it?
Another puzzle, for example:
After a RS is opened by Set RS=dbconn.execute(sql)
I close RS and set RS=Nothing, and I also close the
database connection by dbconn.close.
But I have some ASP scripts afterwards to determine
whether dbconn is existed or not, if yes, I close the
database connection and set dbconn to nothing, here's the
example:
....
Line1 dbconn.close
line2 Set dbconn=Nothing
Line3 If IsObject(dbconn) then
Line4 dbconn.close
Line5 Set dbconn=Nothing
Line6 end if
But an error would occur saying that an object is required
in line4, how can line4 still be executed if I've
delete the object in Line2????
Thank you for any help!
Set RS=Nothing ?
Does this apply to database conneciton as well?
What can be the consequence if I set a RS (or a db connection) to Nothing directly without closing it?
Another puzzle, for example:
After a RS is opened by Set RS=dbconn.execute(sql)
I close RS and set RS=Nothing, and I also close the
database connection by dbconn.close.
But I have some ASP scripts afterwards to determine
whether dbconn is existed or not, if yes, I close the
database connection and set dbconn to nothing, here's the
example:
....
Line1 dbconn.close
line2 Set dbconn=Nothing
Line3 If IsObject(dbconn) then
Line4 dbconn.close
Line5 Set dbconn=Nothing
Line6 end if
But an error would occur saying that an object is required
in line4, how can line4 still be executed if I've
delete the object in Line2????
Thank you for any help!