all groups > sql server dts > september 2005 >
You're in the

sql server dts

group:

Deallocate Global Variable ADO RecordSet?



Deallocate Global Variable ADO RecordSet? Wm. Scott Miller
9/27/2005 10:53:19 AM
sql server dts: Hello all:

I have an ActiveX Script Task that runs some code and builds an
ADOR.RecordSet object and then assigns it to a global variable. The
recordset is used through the rest of the package (its a loop). What I'd
like to know is "Do I have to deallocate this global variable recordset or
will it be done automatically at package termination?" I'm wondering
because I am having periodic problems with my server that seem to be related
to a memory leak and I'm wondering if my package is the culprit as it is one
of the operations that is run regularly.

Scott

Re: Deallocate Global Variable ADO RecordSet? Allan Mitchell
9/28/2005 12:00:00 AM
Certinly in our example here we do not explicitly deallocate the
recordset

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

Allan



"Wm. Scott Miller" <Scott.Miller@spamkillerwvinsurance.gov> wrote in
message news:e8MWkq3wFHA.2232@TK2MSFTNGP11.phx.gbl:

[quoted text, click to view]
Re: Deallocate Global Variable ADO RecordSet? Wm. Scott Miller
9/28/2005 5:01:22 PM
Allen:

So what is the answer to "Do I have to deallocate this global variable
recordset or will it be done automatically at package termination?" I
assume you mean "it will be automatically deallocated" even when
CreateObject("ADOR.RecordSet") is used? The example you provide does not
use an explicit CreateObject.

Scott

[quoted text, click to view]

Re: Deallocate Global Variable ADO RecordSet? Allan Mitchell
9/28/2005 9:28:46 PM
Correct we do not use it because you do not need to.

Allan




"Wm. Scott Miller" <Scott.Miller@spamkillerwvinsurance.gov> wrote in
message news:eMq4I$GxFHA.664@tk2msftngp13.phx.gbl:

[quoted text, click to view]
AddThis Social Bookmark Button