Link to home
Start Free TrialLog in
Avatar of BeenSwank
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.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_qtest_STRING
MM_qtest_STRING = "dsn=fpconfig;uid=XXXXXXX;pwd=XXXXXXX;"
%>

<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = 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>&nbsp;</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("Order_Row_ID").Value)%></td>
      <td><%=(Recordset1.Fields.Item("Insert_Date").Value)%></td>
      <td><%=(Recordset1.Fields.Item("Title_ID").Value)%></td>
      <td><%=(Recordset1.Fields.Item("Insert_net_price").Value)%></td>
      <td><%=(Recordset1.Fields.Item("Insert_gross_price").Value)%></td>
      <td><%=(Recordset1.Fields.Item("Last_option_date").Value)%></td>
      <td><%=(Recordset1.Fields.Item("Passed_to_accounts").Value)%></td>
    </tr>
    <%
  Repeat1__index=Repeat1__index+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
%>
ASKER CERTIFIED SOLUTION
Avatar of kevp75
kevp75
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BeenSwank
BeenSwank

ASKER

I didnt get an error line number likewise I have the permissions set up correctly on the folder the .asp file is but not the datasource - could this be the error? The full error page is:

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
 
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.
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

good cathc.   you'll probably also want to get rid of the () on .close as well
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.
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.
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
Re-opened by Expert request.
Vee_Mod
Experts Exchange Moderator
thanks Vee