Forum Moderators: open

Message Too Old, No Replies

Help anyone...

         

yuezz

7:42 am on Aug 15, 2005 (gmt 0)

10+ Year Member



I got the error:
ADODB.Field (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

when i try to update a table with dynamic values i just calulate with ASP function what should i do?

the codes looks like:

<form ACTION="<%=MM_editAction%>" METHOD="POST" name="UserTableUpdate" id="UserTableUpdate">
<%
While ((Repeat1__numRows <> 0) AND (NOT EditAccBal.EOF))
%>
<tr>
<td><%=(EditAccBal.Fields.Item("BAccNo").Value)%> <input name="bankaccno" type="hidden"value="<%=EditAccBal.Fields.Item("BAccNo").Value%>" > </td>
<td><%=(EditAccBal.Fields.Item("UserName").Value)%></td>
<td><%=(EditAccBal.Fields.Item("AccBalance").Value)%></td>
<td><input name="newBalance" type="text" disabled id="newBalance" value="<%If addAmt >= 0 Then Response.Write(cint((EditAccBal.Fields.Item("AccBalance").Value)) + addAmt) End If%>"></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
EditAccBal.MoveNext()
Wend
%>
</table>
<div align="justify"></div>
<div align="left">
<input name="imageField" type="image" src="pic/update.gif" width="100" height="40" border="0">
</div>
<input type="hidden" name="MM_update" value="UserTableUpdate">
<input type="hidden" name="MM_recordId" value="<%= EditAccBal.Fields.Item("BAccNo").Value %>">
</form>

replies will be greatly appreciated!

mrMister

1:23 pm on Aug 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try this...

<% If NOT EditAccBal.EOF Then%>
<input type="hidden" name="MM_recordId" value="<%= EditAccBal.Fields.Item("BAccNo").Value %>">
<% End If%>

yuezz

1:26 am on Aug 16, 2005 (gmt 0)

10+ Year Member



Thanks...this does stop the error but the table does not update in the database,it juz refresh the same page but this time the information obtained previously is gone...what could be the problem?

mrMister

11:26 pm on Aug 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's outside the loop. Your database access code is at the top of the page and you're trying to access the database outside of that loop. At that point you're at the end of the database so there's no data in there.