Simple Recordset question....

Results 1 to 4 of 4

Thread: Simple Recordset question....

  1. #1
    Jason Guest

    Default Simple Recordset question....

    Hi,<BR>A recordset is in between an if then statement. It may or may not be opened. How do I check to see if it was opened so i can add the ors.close and set ors=nothing. I tried doing this:<BR>if vRat2("FirstName") &#060;&#062; "" then<BR>vRat2.Close<BR>set vRat2 = Nothing<BR>end if<BR><BR>and this:<BR>if vRat2("FirstName") = "" then<BR>else<BR>vRat2.Close<BR>set vRat2 = Nothing<BR>end if<BR><BR>Both produce Exception errors. Can I just leave the recordset open if it was opened? What negative effects does leaving recordsets open have?<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default clean up your room, i mean objects ....

    Umm<BR><BR>Don&#039;t leave objects open, if you can help it<BR><BR>why not localize your recordset fields<BR>dim myvar<BR>myvar = rs("ahkileshsmokes")<BR>then destroy the recordset,<BR><BR>then you don&#039;t have to worry about it.

  3. #3
    Rosewater Guest

    Default RE: Simple Recordset question....

    Use the Recordset.State<BR><BR>= 0 if the recordset is closed<BR>= 1 if the recordset is open

  4. #4
    Jason Guest

    Default Money, Thanks!

    Money! Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts