S
Steve
I have an ADP in which I am making lots of connections within the VB code to
the SQL database and then closing the connections. In addiotn, I am
creating lots of recordsets and then setting the record sets to nothing when
I am done.
Is there and easy way to determine if the code is leaving connections open
or retaining orphan recordsets?
Specifically, whenever I am using code such as:
set conn = ado_connect
I should be ending the procedure with
set conn = nothing
Additionally, for everytime I setup a recordset such as
set rs = conn.execute("SELECT Agent from stbl_Agents")
There should be the following code when the procedure is done:
set rs = nothing
Am I correct in these assumptions? If so, Is there a good way to test the
code to find orphan connections?
NOTE: It appears that after a while, my machin is running out of memory and
I am thinking it might be trying to keep connections open and retain orphan
recordsets.
Help?
the SQL database and then closing the connections. In addiotn, I am
creating lots of recordsets and then setting the record sets to nothing when
I am done.
Is there and easy way to determine if the code is leaving connections open
or retaining orphan recordsets?
Specifically, whenever I am using code such as:
set conn = ado_connect
I should be ending the procedure with
set conn = nothing
Additionally, for everytime I setup a recordset such as
set rs = conn.execute("SELECT Agent from stbl_Agents")
There should be the following code when the procedure is done:
set rs = nothing
Am I correct in these assumptions? If so, Is there a good way to test the
code to find orphan connections?
NOTE: It appears that after a while, my machin is running out of memory and
I am thinking it might be trying to keep connections open and retain orphan
recordsets.
Help?