Bob Barrows [MVP] wrote:
Seth wrote: Pretty straight forward. Reason I'm asking is because I'm not sure if
I should explicitly close my recordset and database connections
before each redirect or get away with having a one time close at the
bottom of my page. Thanks for the help.
Redirect does what it says. Nothing else is processed. My practice is
to process database objects first, closing and destroying them when
fineshed. THEN make decisions as to whether to redirect or not.
Just to clarify, by "process", I mean:
Assign the data contained in the database objects to variables (including
using GetRows to assign the data to an array, or GetString to create a
string containing the data, if I need to process multiple records). After
this operation, there is no longer any need to keep the database objects
open, so at this point, I close and destroy them.
NOW I process the variables containing the data, writing them to response,
or making decisions as to whether or not to redirect, etc.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"