Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with a testsystem site that is just driving me crazy!!!!

Status
Not open for further replies.

coily

Technical User
Jan 26, 2005
25
GB
Hi,

I have a testsystem site in both German and English, that works fine in live system. Whats worse, is that I have tried copying across the live scripts but it still has an error.

The error I get is the Operation not allowed while object is closed. At a line 410 that is:-

Code:
<% if rsprop.eof then %>

I have done some debugging and am just totally confused now.

At line 372 I wrote this:-

Code:
 if request("r1")<>"" then
	sql ="w1_Query 1,'"& session("UID") & "', '" & FormatDateTime(request("startdate"),1) & "', '" & request("nights") & "','" & getcontract & "', '" & City & "',NULL, '%" & request("supname") & "%'," & r1 & r2 & r3 & r4
	rsprop.Open sql,con
	if rsprop.state = adStateOpen Then
	Response.write("Open")
	Else
	Response.write("Closed")
	End If
  else 
    sql="w_ctrsearch '', ''," & session("SID") & ",'" & getcontract &"' , '%" & request("supname") & "%', NULL, '"& city &"', NULL,'" & FormatDateTime(request("startdate"),1) & "','" & request("nights") & "', NULL, NULL, NULL, 1, NULL, NULL"
	rsprop.Open sql, con
  end if

Now when I run this, I get "open"!!!! I dont understand why and I really need to fix the problem so my German freinds will stop complaining that they cannot test the system.

Any attempt to work with the recordset throws an error yet its state is open. The recordset just doesn't seem to open.

Any help would be great :)
 
Do you have adStateOpen defined somewhere above in the scripts? Like perhaps do you INCLUDE the file adovbs.inc ???

If not then adStateOpen will be empty and instead use:[tt]
if rsprop.state = 1 Then[/tt]

Also I noticed that you check the state property after attempting to open the recordset after "r1"<>"" but not on the part after the ELSE.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top