Note that there are some explanatory texts on larger screens.

plurals
  1. POError in ASP SQL
    primarykey
    data
    text
    <p>The error says: Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.</p> <p>I have code that receives an id, which is a number, from another site and will edit the data that matches the id.</p> <pre><code>&lt;body&gt; &lt;table style="width: 100%"&gt; &lt;tr&gt; &lt;!-- #include file="header.html"--&gt; &lt;/tr&gt; &lt;/table&gt; &lt;table&gt; &lt;tr &gt; &lt;td style="width:885px" class="style2" &gt; &lt;% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "C:\inetpub\wwwroot\library\database.mdb" cid=Request.Form("number") if Request.form("firstname")="" then set rs=Server.CreateObject("ADODB.Recordset") rs.open "SELECT * FROM users WHERE no='" &amp; cid &amp; "'",conn %&gt; &lt;form method="post" action="change.asp"&gt; &lt;table&gt; &lt;%for each x in rs.Fields%&gt; &lt;tr&gt; &lt;td&gt;&lt;% Response.Write(x.name)%&gt;&lt;/td&gt; &lt;td&gt;&lt;input name='&lt;%Response.Write(x.name)%&gt;' value='&lt;%Response.Write(x.value)%&gt;'&gt;&lt;/td&gt; &lt;%next%&gt; &lt;/tr&gt; &lt;/table&gt; &lt;br /&gt;&lt;br /&gt; &lt;input type="submit" value="Update record"&gt; &lt;/form&gt; &lt;% else sql="UPDATE users SET " sql=sql &amp; "firstname='" &amp; Request.Form("firstname") &amp; "'," sql=sql &amp; "lastname='" &amp; Request.Form("lastname") &amp; "'," sql=sql &amp; "Gender='" &amp; Request.Form("Gender") &amp; "'" sql=sql &amp; " WHERE no='" &amp; cid &amp; "'" on error resume next conn.Execute sql if err&lt;&gt;0 then response.write("No update permissions!") else response.write("Record " &amp; cid &amp; " was updated!") end if end if conn.close %&gt; &lt;/td&gt; &lt;td&gt;&lt;!--#include file="sideMenu.html"--&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/body&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload