What Happens ???

Results 1 to 2 of 2

Thread: What Happens ???

  1. #1
    Join Date
    Dec 1969

    Default What Happens ???

    Hello all <BR>I&#039ve got a question for you.<BR><BR>When I do:<BR>Set objRS = conn.Execute(strSQL1)<BR><BR>Response.Write "--&#062;" & objRS("FirstName") & "<BR>"<BR><BR>************************************ ***********<BR>Notice that I dont close the recordset object *<BR>and that I dont Set it to nothing *<BR>********************************************* **<BR><BR>Then I decide to do this.<BR>Set objRS = conn.Execute(strSQL2)<BR><BR>Response.Write "--&#062;" & objRS("Salary") & "<BR>"<BR><BR>What Happens???<BR>what I mean is that, am I creating two different instances of objRS object in memory ?<BR>Since I havent closed the first object ex. objRS.Close and <BR>Set objRS = nothing<BR><BR>When I do another Set objRS a second time does it mean that two instances of that object is created OR it just overwrites the first one?<BR><BR>Please help me understand this :)<BR>Thank you<BR>Sincerely<BR>Vlince

  2. #2
    Fimpen Guest

    Default RE: What Happens ???

    Someone correct me if I am wrong here.<BR><BR>When you set objRS to equal another object without closing and releasing the memory of the first object, you automatically loose your pointer/reference to the previous object and subsequently the system will &#039clean itself&#039. It actually performs the same cleanup which .close and = NOTHING does for you,but behind the scenes. With this said, I always for close and set the object to NOTHING before I create the next instance just to be on the safe side.

Posting Permissions

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