Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closed Recordset?
Message
From
05/08/1999 04:29:38
 
 
To
All
General information
Forum:
Visual C++
Category:
Other
Title:
Closed Recordset?
Miscellaneous
Thread ID:
00250081
Message ID:
00250081
Views:
56
I have 3 asp pages like:

ASPpage1.asp:

<% dbf_qry = "select * from mytable"
Set db_rs = CreateObject("ADODB.Recordset")
db_rs.open dbf_qry, "DSN=mydsn;UID=myid;PWD="
%>

'
' Display contents of table
'

<% db_rs.Close %>

'A button is clicked and the page is redirected to ASPpage2.asp - a
'page for data entry

ASPpage2.asp:

'Contains a submit button and html textboxes, when submit button is
'clicked results are passed on to ASPpage3 for processing

ASPpage3.asp:

<% myvar1 = Request.Form("textboxvar")
myvar2=99.99
new_qry = "Insert into cmts_unit_invty values(" & "'" & myvar1 & _
"'," & myvar2 & ")"
set new_rs = server.CreateObject("ADODB.Recordset")
new_rs.Open new_qry,"DSN=mydsn;UID=myid;PWD="
new_rs.Close
Response.Redirect("ASPpage1.asp")
%>

I get the error message:

The operation requested by the application is not allowed if the object is closed.

Why is this and how can i solve this problem? Thanks for any solutions/suggestions.

Carlos
Reply
Map
View

Click here to load this message in the networking platform