Results 1 to 2 of 2

Thread: Editing within a Recordset - Runtime Error 3027

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Posts
    3

    Editing within a Recordset - Runtime Error 3027

    Hi,

    I'm getting the following error when trying to do an rs.edit within my code.

    Run-time error '3027': Cannot Update. Database or object is read-only.

    Now, I've checked the SQL string that i'm using as the recordset (by currentdb.openrecordset(sSQL)) and it's fine and in debug mode I can see that it can read values of fields within the recordsets.

    It's just that when I come to edit the record it obviously won't let me. Nothong is read only as far as I can make out, and this code mirrors some code in my other database (only different is the SQL string is different). This SQL string returns many more records. Could that be an issue?

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    1) If this is an access database, right click the file > properties & make sure the database itself isnt read only.

    2) Have you set the cursortype and LockType properties of the recordset object before you call the open() method?

    I suspect it's number 2 here as the default locktype if you don't specify one is ReadOnly ...

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width