Update database ASP

They have: 105 posts

Joined: Mar 2006

I keep getting this error when trying to update fields for a record in the database

ADODB.Field error '80020009'

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

How can I ensure that it updates the current record?

JeevesBond's picture

He has: 3,956 posts

Joined: Jun 2002

You need to do a check to ensure you're not at BOF or EOF. I think it runs something like:

If Recordset.BOF Or Recordset.EOF Then
  ... some error condition stuff
End If
'
I presume you're running a query to find the record that needs to be updated? It seems that query is not returning any records. You should also use Recordset.MoveFirst before trying to manipulate the current record.

Hope this helps. Smiling

a Padded Cell our articles site!

They have: 105 posts

Joined: Mar 2006

Yes thanks that worked! Wink

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.