closing connection from called pages (via server.execute)
am 19.01.2005 20:46:16 von TB
Hi All:
I have an ASP page which calls another another page via server.execute,
which means that focus is returned the initial page after executing the code
in the second page.
Both pages call a database, creating different record sets.
My doubt is whether it is necessary / recommeded to open and close the
database connection each time, and whether closing the connection in the
second page (called from the first page) affects the first page.
Thanks
TB
Re: closing connection from called pages (via server.execute)
am 19.01.2005 21:11:13 von reb01501
TB wrote:
> Hi All:
>
> I have an ASP page which calls another another page via
> server.execute, which means that focus is returned the initial page
> after executing the code in the second page.
>
> Both pages call a database, creating different record sets.
>
> My doubt is whether it is necessary / recommeded to open and close the
> database connection each time, and whether closing the connection in
> the second page (called from the first page) affects the first page.
>
Each page has its own scope, so yes, you need to close and destroy your ADO
objects on both pages. It's not like using #include.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: closing connection from called pages (via server.execute)
am 20.01.2005 00:16:19 von TB
Thanks for the prompt reply..
TB
"Bob Barrows [MVP]" wrote in message
news:%23S57rNm$EHA.3700@tk2msftngp13.phx.gbl...
> Each page has its own scope, so yes, you need to close and destroy your
> ADO
> objects on both pages. It's not like using #include.
>
> Bob Barrows
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>