Recordsets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Taftheman
    New Member
    • Nov 2006
    • 93

    Recordsets

    Hi as i have been working i have noticed things in vb which i think i may need clarification.

    What is the difference between recordset.Close and Recordset = nothing
    it is used bot times in many of the forms, but some times only uses nothing. is there a way to use this.

    Like for a global recordset you would use .close while a private recordset in a form would just use = nothing

    thanks in advance if anyone can help
  • cmrhema
    Contributor
    • Jan 2007
    • 375

    #2
    Originally posted by Taftheman
    Hi as i have been working i have noticed things in vb which i think i may need clarification.

    What is the difference between recordset.Close and Recordset = nothing
    it is used bot times in many of the forms, but some times only uses nothing. is there a way to use this.

    Like for a global recordset you would use .close while a private recordset in a form would just use = nothing

    thanks in advance if anyone can help

    I was taught that when you are finished with the recordset you close it.
    recordset.Close ()
    whereas if you want to reuse the recordset you can open it again but otherwise release the object variable from memory by the statement
    Set recordset = Nothing

    Comment

    • ansumansahu
      New Member
      • Mar 2007
      • 149

      #3
      Originally posted by Taftheman
      Hi as i have been working i have noticed things in vb which i think i may need clarification.

      What is the difference between recordset.Close and Recordset = nothing
      it is used bot times in many of the forms, but some times only uses nothing. is there a way to use this.

      Like for a global recordset you would use .close while a private recordset in a form would just use = nothing

      thanks in advance if anyone can help
      recordset.Close will close the recordset but it can be opened once again later in the program to be used. Where as Recordset = nothing refers to releasing the memory that was used by the recordset.

      -ansuman sahu

      Comment

      Working...