Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

EOF BOF error

Community Beginner ,
Jul 22, 2006 Jul 22, 2006
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
TOPICS
Server side applications
606
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Jul 24, 2006 Jul 24, 2006
<%
var rsEditSandS__MMColParam = "12";
if (String(Request.QueryString("id")) != "undefined" &&
String(Request.QueryString("id")) != "") {
rsEditSandS__MMColParam = String(Request.QueryString("id"));
}
%>

In this code, the 12 on my local file was not synchronizing to the remote. The remote still had 1 instead of 12.

That cleared this problem. I will post another problem elsewhere. Thanks to Nancy for her assistance.
Translate
LEGEND ,
Jul 22, 2006 Jul 22, 2006
It's not finding a value in the field named "creator". Do you have such a
field in your recordset?


--
Nancy Gill
Adobe Community Expert
BLOG: http://www.dmxwishes.com/blog.asp
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development



"bolin" <webforumsuser@macromedia.com> wrote in message
news:e9tled$547$1@forums.macromedia.com...
>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
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 22, 2006 Jul 22, 2006
Yes, I do. And it has a value in record 12 (the name Hollimon).

Thanks for that reply. I'll rebuild the database and see if that helps.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 22, 2006 Jul 22, 2006
Compacting/repairing the database did not help.

I'm really stumped. It just makes no sense that the same database could work with the search by id, but not when the search by id is going to be used to update. It's failing to display the results page. That is it shows part of the page until it reaches the part where the retrieved data would be displayed and then stops there. I wouldn't think the update code would matter because it would not have been accessed at that time. So, what would matter? How could the page load and display without the filter, showing the first of the 844 records, but fail with this error when the filter is set to filter by "=" on id, which is an autonumber field, and is unique? I've tried other default values (other than 12). No difference.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 22, 2006 Jul 22, 2006
Try taking the update code off and test your page as just a results page.
When you have something like this, taking it one step at a time can make all
the difference.


--
Nancy Gill
Adobe Community Expert
BLOG: http://www.dmxwishes.com/blog.asp
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development


"bolin" <webforumsuser@macromedia.com> wrote in message
news:e9ubbu$smu$1@forums.macromedia.com...
> Compacting/repairing the database did not help.
>
> I'm really stumped. It just makes no sense that the same database could
> work
> with the search by id, but not when the search by id is going to be used
> to
> update. It's failing to display the results page. That is it shows part
> of the
> page until it reaches the part where the retrieved data would be displayed
> and
> then stops there. I wouldn't think the update code would matter because
> it
> would not have been accessed at that time. So, what would matter? How
> could
> the page load and display without the filter, showing the first of the 844
> records, but fail with this error when the filter is set to filter by "="
> on
> id, which is an autonumber field, and is unique? I've tried other default
> values (other than 12). No difference.
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 24, 2006 Jul 24, 2006
LATEST
<%
var rsEditSandS__MMColParam = "12";
if (String(Request.QueryString("id")) != "undefined" &&
String(Request.QueryString("id")) != "") {
rsEditSandS__MMColParam = String(Request.QueryString("id"));
}
%>

In this code, the 12 on my local file was not synchronizing to the remote. The remote still had 1 instead of 12.

That cleared this problem. I will post another problem elsewhere. Thanks to Nancy for her assistance.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines