| Author |
Deallocate Global Variable ADO RecordSet?
|
|
| Wm. Scott Miller 2005-09-27, 11:24 am |
| 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
| |
| Allan Mitchell 2005-09-28, 3:24 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@spamkillerwvi
nsurance.gov> wrote in
message news:e8MWkq3wFHA.2232@TK2MSFTNGP11.phx.gbl:
> 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
| |
| Wm. Scott Miller 2005-09-28, 8:24 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
"Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
news:u06sEi9wFHA.3856@tk2msftngp13.phx.gbl...
> 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@spamkillerwvi
nsurance.gov> wrote in
> message news:e8MWkq3wFHA.2232@TK2MSFTNGP11.phx.gbl:
>
>
| |
| Allan Mitchell 2005-09-28, 8:24 pm |
| Correct we do not use it because you do not need to.
Allan
"Wm. Scott Miller" <Scott. Miller@spamkillerwvi
nsurance.gov> wrote in
message news:eMq4I$GxFHA.664@tk2msftngp13.phx.gbl:
[color=darkred]
> 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
>
> "Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
> news:u06sEi9wFHA.3856@tk2msftngp13.phx.gbl...
|
|
|
|