Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Walnut Cove, NC

    Unanswered: Cannot Update. Database or Object is read-only

    I have written an Access application that writes data to linked Oracle tables. In the past, I have successfully added new records and modified existing records. For some unknown reason, the tables are now read-only when I use Access. I can go straight into the table in Access and it will not let me make any changes. When I try to add a new record from my form I get the message "Cannot update. Database or Object is read-only". I have tried to add a record from several different computers with different versions of Access and logged on as different users. I get the same message. Something has changed to cause my access to change to read-only. When I get the message and go to DEBUG, the .AddNew is highligted.

    Here's my code:

    Private Sub cmdAdd_Click()

    Static stCraftsmen As String

    Dim intRefrigID As Integer
    Dim rst As ADODB.Recordset

    Set rst = New ADODB.Recordset
    With rst
    .ActiveConnection = CurrentProject.Connection
    .Open "SELECT * from afm_refrig_usage;", CurrentProject.Connection, adOpenKeyset, adLockOptimistic
    intRefrigID = rst.RecordCount + 1

    rst("cf_id") = Me!cboEmployeeNo
    rst("eq_id") = Me!txtPM
    rst("date_start_inv") = Me!txtInventoryStartDate
    rst("date_end_inv") = Me!txtInventoryEndDate
    rst("amount_used") = Me!txtAmtUsed
    rst("amount_reclaim") = Me!txtAmtReclaimed
    rst("Reclaim_Destination") = Me!txtReclaimedDest
    rst("Refrig_Type") = Me!txtRefrigType
    rst("VN_ID") = Me!cboVendor
    rst("Amount_Purchased") = Me!txtAmtPurchased
    rst("Date_Purch") = Me!txtDatePurchased
    rst("Date_Used") = Me!txtDateUsed
    rst("Refrig_ID") = intRefrigID
    rst("reason_loss") = Me!txtReasonForLoss
    End With
    Set rst = Nothing

    Any help will be greatly appreciated.


  2. #2
    Join Date
    Feb 2004
    Chicago, IL
    The only two things I can think of:

    1. Try using a dynamic recordset
    2. Is afm_refrig_usage a query that is not updateable?

  3. #3
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    I can go straight into the table in Access and it will not let me make any changes.
    That points to a server side permission issue, or a problem with your connection settings. If it doesn't work looking at the raw table, of course it isn't going to work pointing a recordset at said raw table.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Jan 2004
    Walnut Cove, NC
    afm_refrig_usage is an Oracle table.

    I checked the permissions to the .mdb file. We are all in the trustee group that has permissions to the file.

    What kind of connection settings could be wrong?


Posting Permissions

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