Results 1 to 3 of 3

Thread: How do i get rid of Read only access on a Database Table?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Location
    Brisbane, Qld, Australia
    Posts
    78

    Post

    Hi, I get a error '3027' when i run my program. It states in the error "Can't update. Database or object read only."
    This is the code for CreateTransaction() function:

    Dim mRstrans As Recordset, dd As Integer

    Set qryDef = pDatabase.QueryDefs("QryResults")

    Set mRstrans = qryDef.OpenRecordset(, dbOpenDynaset)
    dd = Mid$(FrmMain.LsvDetails.SelectedItem.Key, 2)

    Do While Not mRstrans.EOF
    If mRstrans!RAccountID = dd Then
    mRstrans.AddNew
    mRstrans!RDate = FrmClient.TxtSize(0).Text
    mRstrans!RComments = "Starting Weights and Scales"
    mRstrans!RLThigh = FrmClient.TxtSize(1).Text
    mRstrans!RRThigh = FrmClient.TxtSize(2).Text
    mRstrans!RBust = FrmClient.TxtSize(3).Text
    mRstrans!RWaist = FrmClient.TxtSize(4).Text
    mRstrans!RHips = FrmClient.TxtSize(5).Text
    mRstrans!RWeight = FrmClient.TxtSize(6).Text
    mRstrans!RPlus = FrmClient.TxtSize(7).Text
    mRstrans.Update
    mRstrans.Close

    mRstrans.MoveNext
    Else
    mRstrans.MoveNext
    End If
    Loop
    mRstrans.Close

    This code is on form 2 and i have called it on form1.. now it gets stuck on the line "mRstrans.addnew" and states that error but i have similar code on the frst form for a different table. QryResults combines the 2 tables together(clients and results). I have called on form 1 to open table clients but on form 2 i have only opened a query. Coukld this be the problem? Although i have tried to used table results here as well but same problem. Any ideas on how to unlock the table so it can be written to.

    Thanks in advance
    Mike

  2. #2
    New Member
    Join Date
    Jan 1999
    Location
    Albany, NY, USA
    Posts
    15

    Post

    I had the same exact problem...my database wasn't that big and so I just re-made it because I couldn't find the problem. I tried to use the MS Knowledge Base...the closest I came was that if one of linked tables does't have a primary key then the recordset will come up read-only. I was pretty sure that was my problem (I had deleted a linked table and made it again and was pretty sure that messed up everything) but couldn't seem to find the link that had the problem. There were a couple of other explanations, I think if you use the Knowledge Base and type in "Can't update" then it gives you some ideas.

  3. #3
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425
    I still have the same problem...

    I connect to a MySQL server and I get the readonly error, but when I do it trough a mdb file, everything is ok

    When I use a MySQL GUI to access the same database I can edit everything...
    "Experience is something you don't get until just after you need it."

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