Skip to main content
Inspiring
March 14, 2008
Question

ASP Command object isn't closed in DW code?

  • March 14, 2008
  • 7 replies
  • 572 views
Hi,

I have recently noticed that the Pagefile useage on one of my servers runs
high most of the time. I am wondering if this is due to memory leakage from
the fact that my DW generated code doesn't explicitly close the Command
object in the ASP code.

Does anyone know if this could be helped by setting the Comand object '=
Nothing' at the end of the script or is there another way.

I am using DWMX2005 - Classic ASP to a SQL Server 2000 db.

Thanks.


This topic has been closed for replies.

7 replies

Inspiring
March 16, 2008
Your right I think Ray Wet or Tom Muck Came up with a extension to do just
that, I think Adobe could have included this with the 8.02 up date that
fixed the SQL injection issue. Hope some of this will be included in the
next version.
Dave

"Pat Shaw" <pat@nomail.com> wrote in message
news:frk31c$j69$1@forums.macromedia.com...
> Yes, I totally agree, so why doesn't DWMX do this for you? I remember in
> UltraDev1 (for those who can remember back that far), the rs was not
closed
> at the bottom of the page and this was corrected in UD4 which was the next
> version.
>
> "Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote in message
> news:frjkoa$4ik$1@forums.macromedia.com...
> >I have always been under the impression that every thing needs to be
closed
> > including all objects, Command, CDO etc.
> > set commandobject=nothing // destroy the command object
> > Including all connections, recoredset's and so on.
> > Some helpful information
> > http://www.aspfaq.com/params.htm
> > Dave
> >
> >
> > "Pat Shaw" <pat@nomail.com> wrote in message
> > news:friqu9$8e1$1@forums.macromedia.com...
> >> Thanks but this is different. I am talking about the Command object.
> >>
> >> "Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote in message
> >> news:frem9q$peb$1@forums.macromedia.com...
> >> > Hi! Pat
> >> > I always add this to the end of my asp pages.
> >> >
> >> > </body>
> >> > </html>
> >> > <%
> >> > rsYourRecordset.Close()
> >> > %>
> >> >
> >> > Dave
> >> > "Pat Shaw" <pat@nomail.com> wrote in message
> >> > news:frdkff$jjo$1@forums.macromedia.com...
> >> >> Hi,
> >> >>
> >> >> I have recently noticed that the Pagefile useage on one of my
servers
> >> >> runs
> >> >> high most of the time. I am wondering if this is due to memory
leakage
> >> > from
> >> >> the fact that my DW generated code doesn't explicitly close the
> >> >> Command
> >> >> object in the ASP code.
> >> >>
> >> >> Does anyone know if this could be helped by setting the Comand
object
> > '=
> >> >> Nothing' at the end of the script or is there another way.
> >> >>
> >> >> I am using DWMX2005 - Classic ASP to a SQL Server 2000 db.
> >> >>
> >> >> Thanks.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>


Inspiring
March 16, 2008
Yes, I totally agree, so why doesn't DWMX do this for you? I remember in
UltraDev1 (for those who can remember back that far), the rs was not closed
at the bottom of the page and this was corrected in UD4 which was the next
version.

"Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote in message
news:frjkoa$4ik$1@forums.macromedia.com...
>I have always been under the impression that every thing needs to be closed
> including all objects, Command, CDO etc.
> set commandobject=nothing // destroy the command object
> Including all connections, recoredset's and so on.
> Some helpful information
> http://www.aspfaq.com/params.htm
> Dave
>
>
> "Pat Shaw" <pat@nomail.com> wrote in message
> news:friqu9$8e1$1@forums.macromedia.com...
>> Thanks but this is different. I am talking about the Command object.
>>
>> "Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote in message
>> news:frem9q$peb$1@forums.macromedia.com...
>> > Hi! Pat
>> > I always add this to the end of my asp pages.
>> >
>> > </body>
>> > </html>
>> > <%
>> > rsYourRecordset.Close()
>> > %>
>> >
>> > Dave
>> > "Pat Shaw" <pat@nomail.com> wrote in message
>> > news:frdkff$jjo$1@forums.macromedia.com...
>> >> Hi,
>> >>
>> >> I have recently noticed that the Pagefile useage on one of my servers
>> >> runs
>> >> high most of the time. I am wondering if this is due to memory leakage
>> > from
>> >> the fact that my DW generated code doesn't explicitly close the
>> >> Command
>> >> object in the ASP code.
>> >>
>> >> Does anyone know if this could be helped by setting the Comand object
> '=
>> >> Nothing' at the end of the script or is there another way.
>> >>
>> >> I am using DWMX2005 - Classic ASP to a SQL Server 2000 db.
>> >>
>> >> Thanks.
>> >>
>> >>
>> >
>> >
>>
>>
>
>


Inspiring
March 16, 2008
I have always been under the impression that every thing needs to be closed
including all objects, Command, CDO etc.
set commandobject=nothing // destroy the command object
Including all connections, recoredset's and so on.
Some helpful information
http://www.aspfaq.com/params.htm
Dave


"Pat Shaw" <pat@nomail.com> wrote in message
news:friqu9$8e1$1@forums.macromedia.com...
> Thanks but this is different. I am talking about the Command object.
>
> "Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote in message
> news:frem9q$peb$1@forums.macromedia.com...
> > Hi! Pat
> > I always add this to the end of my asp pages.
> >
> > </body>
> > </html>
> > <%
> > rsYourRecordset.Close()
> > %>
> >
> > Dave
> > "Pat Shaw" <pat@nomail.com> wrote in message
> > news:frdkff$jjo$1@forums.macromedia.com...
> >> Hi,
> >>
> >> I have recently noticed that the Pagefile useage on one of my servers
> >> runs
> >> high most of the time. I am wondering if this is due to memory leakage
> > from
> >> the fact that my DW generated code doesn't explicitly close the Command
> >> object in the ASP code.
> >>
> >> Does anyone know if this could be helped by setting the Comand object
'=
> >> Nothing' at the end of the script or is there another way.
> >>
> >> I am using DWMX2005 - Classic ASP to a SQL Server 2000 db.
> >>
> >> Thanks.
> >>
> >>
> >
> >
>
>


Inspiring
March 16, 2008
No, I must admit I haven't added it yet as there are a hell of a lot of
pages to modify. I wanted to check first that
a) Adding this would not have any adverse effects or possible side effects
b) adding it may actually help

This is a live business critical site so I am approaching with caution
before I make any changes.

Pat.

"Philo" <meansyou@nospam.net> wrote in message
news:frjdon$qqr$1@forums.macromedia.com...
> Have you added code to close it the object? Then seeing the difference>
>
> From working in Delphi I seem to recall it should be closed. IIRC any
> ado object should be closed.
>


Inspiring
March 16, 2008
Have you added code to close it the object? Then seeing the difference>

From working in Delphi I seem to recall it should be closed. IIRC any
ado object should be closed.

Inspiring
March 16, 2008
Thanks but this is different. I am talking about the Command object.

"Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote in message
news:frem9q$peb$1@forums.macromedia.com...
> Hi! Pat
> I always add this to the end of my asp pages.
>
> </body>
> </html>
> <%
> rsYourRecordset.Close()
> %>
>
> Dave
> "Pat Shaw" <pat@nomail.com> wrote in message
> news:frdkff$jjo$1@forums.macromedia.com...
>> Hi,
>>
>> I have recently noticed that the Pagefile useage on one of my servers
>> runs
>> high most of the time. I am wondering if this is due to memory leakage
> from
>> the fact that my DW generated code doesn't explicitly close the Command
>> object in the ASP code.
>>
>> Does anyone know if this could be helped by setting the Comand object '=
>> Nothing' at the end of the script or is there another way.
>>
>> I am using DWMX2005 - Classic ASP to a SQL Server 2000 db.
>>
>> Thanks.
>>
>>
>
>


Inspiring
March 14, 2008
Hi! Pat
I always add this to the end of my asp pages.

</body>
</html>
<%
rsYourRecordset.Close()
%>

Dave
"Pat Shaw" <pat@nomail.com> wrote in message
news:frdkff$jjo$1@forums.macromedia.com...
> Hi,
>
> I have recently noticed that the Pagefile useage on one of my servers runs
> high most of the time. I am wondering if this is due to memory leakage
from
> the fact that my DW generated code doesn't explicitly close the Command
> object in the ASP code.
>
> Does anyone know if this could be helped by setting the Comand object '=
> Nothing' at the end of the script or is there another way.
>
> I am using DWMX2005 - Classic ASP to a SQL Server 2000 db.
>
> Thanks.
>
>