473,322 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

response.redirect and recordset/connection object?

I have the following code in JScript. Should I close and release the
database objects
before run response.redirect("some url")? or will the response.redirect
automatically close the database object/connection like the end of asp
script?

.......
var cmd = Server.CreateObject("ADODB.Command")
var rs = Server.CreateObject("ADODB.Recordset")
cmd.ActiveConnection = conn
cmd.CommandText = strCmd
cmd.CommandType = adCmdStoredProc
rs.Open(cmd)

.......

response.redirect("some url")

Nov 18 '05 #1
1 1117
Nick,
Yes, you should close out all objects when you don't need them anymore.
Don't expect or even wait for something else to clean up your variables.
Being proactive will make it a better application. By the way, this is an
ASP.NET newsgroup, not an ASP 3.0 newsgroup.

Best regards,
Jeffrey Palermo

"nick" <nb***@removethis.hotmail.com> wrote in message
news:Ox**************@TK2MSFTNGP09.phx.gbl...
I have the following code in JScript. Should I close and release the
database objects
before run response.redirect("some url")? or will the response.redirect
automatically close the database object/connection like the end of asp
script?

......
var cmd = Server.CreateObject("ADODB.Command")
var rs = Server.CreateObject("ADODB.Recordset")
cmd.ActiveConnection = conn
cmd.CommandText = strCmd
cmd.CommandType = adCmdStoredProc
rs.Open(cmd)

......

response.redirect("some url")

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: TinyTim | last post by:
I'm a newbie at ASP & HTML. It seems that when you use server side code and you're going to return a customized HTML form with several fields and labels, you have to do an extensive amount of...
6
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx pages, each page contains a common .ascx. This ascx...
1
by: Milan Todorovic | last post by:
I need some help with my ASP.NET application. The central part of the application is very processing intensive page that can take up to several minutes to process the complex queries and load the...
7
by: Joe Rigley | last post by:
Hi, I have a custom class with a public method. I want to perform a repose.redirect if an error occurs in the public method GetUserRoles. Unfortunately, Visual Studio 2003 is throwing an error...
10
by: GreggTB | last post by:
I've got an page (LOGIN.ASPX) that receives the user's login information. During the page load, it checks the credentials against a database and, if validation is successful, creates an instance of...
10
by: isaac2004 | last post by:
hello i am trying to use a response redirect statment to show a message upon deletion of a record from a database. my database is ran though a page with a table with a delete option on the side....
4
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP requests by bassing the ASPSESSIONID cookie through the...
6
by: gyung | last post by:
Hi, this is my first post but I've been constantly referred to this site when I needed help. Anyway, this time I can't seem to find anything, so here goes. This is part of my case statement, and I...
1
by: Gurpal | last post by:
I'm getting this error when I test this page. Here is the error: Response object error 'ASP 0251 : 80004005' Response Buffer Limit Exceeded /test/test4.asp, line 0 Execution of the ASP...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.