Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with error ADODB.Field error '80020009' BOF or EOF

Status
Not open for further replies.

ceeleelewis

Programmer
Sep 26, 2002
45
0
0
US
My application has been fine up to this point but I have ran into an error that crashes my application everytime I try to submit a change to record. I receive the following message ...

ADODB.Field error '80020009'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.


Now I know that my dBase has the record that I'm trying to edit inside the correct table.

I just don't know if I'm using the EOF property correctly in this case?

While objRS.BOF= false
'objRS("reqFormId") = Trim(Request.Form("reqFormId"))
'objRS("reqDate") = Trim(Request.Form("reqDate"))
objRS("DNS") = Trim(Request.Form("DNS"))
objRS("pssWrd") = Trim(Request.Form("PASSWORD"))
objRS("chDksp") =Trim(Request.Form("chDksp"))
objRS("shMem_pre") = Trim(Request.Form("shMem_pre"))
objRS("dtAppsdb") = Trim(Request.Form("dtAppsdb"))
objRS("sndMrt") = Trim(Request.Form("sndMrt"))
objRS("preInstDate") = Trim(Request.Form("preInstDate"))
objRS("PreInstall_Comments") = Trim(Request.Form("PreInstall_Comments"))

objRS.Update

objRS.MoveNext

Wend

Any help would be greatly be apriciated.

 
Ok, sorry for the above post, I was incorrect about the opening of a table, it's been a qwhile since I did an update in this fashion.

The error is occuring because your opening the table dynamically and checking the recordcount. The recordcount only is set in the recordset if you open it with a static or keyset cursor. Since it isn't set the recordset always returns a recordcount of 0 which means it automatically goes into the else of your if/else, skipping the portion where your updating.

It would be better to switch that if check to an if EOF check instead. The recordset will only come back with EOF if there are no records. If there are any records whatsoever than it will come back pointing to one of them instead.

This still doesn't solve your EOF error, however. Basically in this case your recordset is coming back empty, meaning it isn't matching that hardcoded value for the primary key. The portion of the code where it is throwing the EOF error is further down:
Code:
        response.write"****"
        response.write(objRS("DNS"))

So besides the recordcount issue it isn't pulling in the record your looking for either.

-Tarwn

[sub]01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101 [/sub]
[sup]29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19[/sup]
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top