BeenSwank
asked on
Response object, ASP 0104 (0x80070057) Operation not Allowed
I have queried this through various websites and found the solution is recordset1.movenext().... thats certainly not my problem as you can see it is included, here is my code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
' FileName="Connection_odbc_ conn_dsn.h tm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_qtest_STRING
MM_qtest_STRING = "dsn=fpconfig;uid=XXXXXXX; pwd=XXXXXX X;"
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConne ction = MM_qtest_STRING
Recordset1_cmd.CommandText = "SELECT * FROM dbo.Order_Insert ORDER BY Insert_Date ASC"
Recordset1_cmd.Prepared = true
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="search" name="search" method="post" action="">
<strong>Enter search Date</strong> (yyyymmdd):
<input type="text" name="xDate" id="xDate" />
<input type="submit" name="button" id="button" value="Submit" />
</form>
<p> </p>
<table border="0" cellpadding="3" cellspacing="3">
<tr>
<td>Order_Row_ID</td>
<td>Insert_Date</td>
<td>Title_ID</td>
<td>Insert_net_price</td>
<td>Insert_gross_price</td >
<td>Last_option_date</td>
<td>Passed_to_accounts</td >
</tr>
<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) %>
<tr>
<td><%=(Recordset1.Fields. Item("Orde r_Row_ID") .Value)%>< /td>
<td><%=(Recordset1.Fields. Item("Inse rt_Date"). Value)%></ td>
<td><%=(Recordset1.Fields. Item("Titl e_ID").Val ue)%></td>
<td><%=(Recordset1.Fields. Item("Inse rt_net_pri ce").Value )%></td>
<td><%=(Recordset1.Fields. Item("Inse rt_gross_p rice").Val ue)%></td>
<td><%=(Recordset1.Fields. Item("Last _option_da te").Value )%></td>
<td><%=(Recordset1.Fields. Item("Pass ed_to_acco unts").Val ue)%></td>
</tr>
<%
Repeat1__index=Repeat1__in dex+1
Repeat1__numRows=Repeat1__ numRows-1
Recordset1.MoveNext()
Wend
%>
</table>
</body>
</html>
<%
If Err.Number <> 0 Then Response.Write Err.Description
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
' FileName="Connection_odbc_
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_qtest_STRING
MM_qtest_STRING = "dsn=fpconfig;uid=XXXXXXX;
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConne
Recordset1_cmd.CommandText
Recordset1_cmd.Prepared = true
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="search" name="search" method="post" action="">
<strong>Enter search Date</strong> (yyyymmdd):
<input type="text" name="xDate" id="xDate" />
<input type="submit" name="button" id="button" value="Submit" />
</form>
<p> </p>
<table border="0" cellpadding="3" cellspacing="3">
<tr>
<td>Order_Row_ID</td>
<td>Insert_Date</td>
<td>Title_ID</td>
<td>Insert_net_price</td>
<td>Insert_gross_price</td
<td>Last_option_date</td>
<td>Passed_to_accounts</td
</tr>
<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) %>
<tr>
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
</tr>
<%
Repeat1__index=Repeat1__in
Repeat1__numRows=Repeat1__
Recordset1.MoveNext()
Wend
%>
</table>
</body>
</html>
<%
If Err.Number <> 0 Then Response.Write Err.Description
Recordset1.Close()
Set Recordset1 = Nothing
%>
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
check the value of the variable, Repeat1__numRows = -1 you have set it to -1 and decrementing its value in the loop.
In IE 'Advanced Options', untick "Show friendly error messages".
Post the error message you are getting.
Post the error message you are getting.
ASKER
Its on, the error message is the same in FF. too.
It is Recordset1.MoveNext with no braces
so this line
Recordset1.MoveNext()
Chaneg to
Recordset1.MoveNext
so this line
Recordset1.MoveNext()
Chaneg to
Recordset1.MoveNext
good cathc. you'll probably also want to get rid of the () on .close as well
ASKER
No I use () in all my projects and they work fine. I tried limiting the number of records per page to 25 as opposed to all, which fixes the problem. I wonder, could it just be timing out? How can I extend the time allotted on a query? The product is futureproof, its the industry standard $0.5million version - dont know a major ammount about how it works, other than the fact I can source data via dsn.
ASKER
You know what, Ive just realised there are 2,000,000 records - no wonder its timing out, multiple page display it is.
May I know how's the accepted asnwer was the solution ?
Your problem was wrong syntax of movenext.
Your problem was wrong syntax of movenext.
what's with the C grade?
if my answer wasn't the correct one, accept somebody else's...or get your question closed
instead now, because you are lazy the rest of us here have to work around, and get the question re-opened or the grade changed
if my answer wasn't the correct one, accept somebody else's...or get your question closed
instead now, because you are lazy the rest of us here have to work around, and get the question re-opened or the grade changed
Re-opened by Expert request.
Vee_Mod
Experts Exchange Moderator
Vee_Mod
Experts Exchange Moderator
thanks Vee
ASKER
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
--------------------------
Please try the following:
Click the Refresh button, or try again later.
Open the 10.0.0.26 home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
--------------------------
Technical Information (for support personnel)
Error Type:
Response object, ASP 0104 (0x80070057)
Operation not Allowed
/qtest/index.asp
Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Page:
GET /qtest/index.asp
Time:
04 October 2007, 16:40:05
More information:
Microsoft Support