Ado / Adox ?

  • Thread starter Thread starter silvest
  • Start date Start date
I just replied to your previous post, will copy it here:

Either you do not have a new record created when you are trying the update,
or else Access is locking it from you, preventing the update.

Did you remember to call the AddNew method of the recordset? If not, you
have not yet created the space for the new record, so when you try to update
you run into the EOF. This would give the error message you are seeing.

If this is the case, make sure your code does the following after opening
the recordset:
Recordset1.AddNew 'optional: add field list and value list here, or:
' you will need code here to initialize all the fields in the new record
Recordset1.Update
....

A couple other things:
- Be sure to Update before any MoveNext, otherwise you will move past the
end of the file.
- Make sure your recordset's LockType allows updating and is not allowing
Access to lock the record or table on you, preventing any updates. I suggest
using adLockPessimistic to ensure you have full possession of that record
until you actually update it.

For all you ever wanted to know about ADO
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/dasdkadooverview.asp

HTH - K Dales
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top