Answered
EOF BOF error
I am trying to edit DB records (Microsoft Access 2003) using
a form created in Dreamweaver 8. I juse JavaScript since I use it a
little on web pages, but don't know much - as opposed to VBscript
where I really know nothing!
I have a search page by ID and a results page for that search that work as they should. I mention that because that's basically what is not working on my EDIT page.
To edit, I have a search page by ID and a results page (that has the update behavior on it). If I use the search to edit page without a filter, it retrieves and displays the records, all 844 of them. If I add a filter to the recordset to filter by ID so that I only retreive one record to edit, it crashes. Either "live data" or exiting out an trying the page brings the same error:
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record
has been deleted. Requested operation requires
a current record.
/rfisd/Sands2/IDresultstoEdit_z9v7o2rnaj.asp, line 451
Line 451 is:
<input value="<%=((rsEditSandS.Fields.Item("creator").Value))%>" name="creator" type="text" id="creator" size="36">
Heres the recordset:
<%
var rsEditSandS_cmd = Server.CreateObject ("ADODB.Command");
rsEditSandS_cmd.ActiveConnection = MM_conSands_STRING;
rsEditSandS_cmd.CommandText = "SELECT * FROM tblScoSeq WHERE id = ?";
rsEditSandS_cmd.Prepared = true;
rsEditSandS_cmd.Parameters.Append(rsEditSandS_cmd.CreateParameter("param1", 5, 1, -1, rsEditSandS__MMColParam)); // adDouble
var rsEditSandS = rsEditSandS_cmd.Execute();
var rsEditSandS_numRows = 0;
%>
Here's where I set the default to 12:
<%
var rsEditSandS__MMColParam = "12";
if (String(Request.QueryString("id")) != "undefined" &&
String(Request.QueryString("id")) != "") {
rsEditSandS__MMColParam = String(Request.QueryString("id"));
}
%>
Here's where I display the ID. It's not an input because I don't want the user to change it.
<div align="center" class="style2" title="Leave this field alone. The Identification number will appear once you have submitted your document. Use Document List or Quicklist to find the number for your records."><%=(rsEditSandS.Fields.Item("id").Value)%></div>
I just don't understand why the message is caused by the filter since the sample id (12) does exist. The database is not empty - there are 844 records. The connection tests successfully in Dreamweaver. The recordset tests successfully in in dreamweaver filtered and un-filtered. If I go to the DSN configuration, that tests (in DW) as a good connection too, and it IS going to the .mdb that I think it is, and the driver is the Microsoft Access Driver.
I've compared the working Search/Results pages to the non-working Search/Results for Editing (which also has an update behavior on it, but it's not getting that far in the code). I'd appreciate any suggestions for things to check.
TIA
I have a search page by ID and a results page for that search that work as they should. I mention that because that's basically what is not working on my EDIT page.
To edit, I have a search page by ID and a results page (that has the update behavior on it). If I use the search to edit page without a filter, it retrieves and displays the records, all 844 of them. If I add a filter to the recordset to filter by ID so that I only retreive one record to edit, it crashes. Either "live data" or exiting out an trying the page brings the same error:
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record
has been deleted. Requested operation requires
a current record.
/rfisd/Sands2/IDresultstoEdit_z9v7o2rnaj.asp, line 451
Line 451 is:
<input value="<%=((rsEditSandS.Fields.Item("creator").Value))%>" name="creator" type="text" id="creator" size="36">
Heres the recordset:
<%
var rsEditSandS_cmd = Server.CreateObject ("ADODB.Command");
rsEditSandS_cmd.ActiveConnection = MM_conSands_STRING;
rsEditSandS_cmd.CommandText = "SELECT * FROM tblScoSeq WHERE id = ?";
rsEditSandS_cmd.Prepared = true;
rsEditSandS_cmd.Parameters.Append(rsEditSandS_cmd.CreateParameter("param1", 5, 1, -1, rsEditSandS__MMColParam)); // adDouble
var rsEditSandS = rsEditSandS_cmd.Execute();
var rsEditSandS_numRows = 0;
%>
Here's where I set the default to 12:
<%
var rsEditSandS__MMColParam = "12";
if (String(Request.QueryString("id")) != "undefined" &&
String(Request.QueryString("id")) != "") {
rsEditSandS__MMColParam = String(Request.QueryString("id"));
}
%>
Here's where I display the ID. It's not an input because I don't want the user to change it.
<div align="center" class="style2" title="Leave this field alone. The Identification number will appear once you have submitted your document. Use Document List or Quicklist to find the number for your records."><%=(rsEditSandS.Fields.Item("id").Value)%></div>
I just don't understand why the message is caused by the filter since the sample id (12) does exist. The database is not empty - there are 844 records. The connection tests successfully in Dreamweaver. The recordset tests successfully in in dreamweaver filtered and un-filtered. If I go to the DSN configuration, that tests (in DW) as a good connection too, and it IS going to the .mdb that I think it is, and the driver is the Microsoft Access Driver.
I've compared the working Search/Results pages to the non-working Search/Results for Editing (which also has an update behavior on it, but it's not getting that far in the code). I'd appreciate any suggestions for things to check.
TIA
