Error 3027 Cannot Update. Database or object is read-only

shenty

Registered User.
Local time
Today, 14:21
Joined
Jun 8, 2007
Messages
119
I have a very strange problem that has appeared on 3 databases. Error 3027. Cannot update. Database or object is read-only.

I have checked & changed nothing to do with folder persmissions etc. The 3 databases are independant but similar.

All 3 use linked data tables.

The error happens in the VBA code rSt.AddNew.

I have created a new blank database & imported the necessary forms, tables & queries so there are no linked tables and the error is still there.

But all these databases used to work !!!!

Does anyone have the slightest idea where these errors have suddenly appeared from ?

Help would be much appreciated.

P.S. My Stripped down DB is attached. Clicking the "Add Record to cows history ---->" causes it.
 

Attachments

The query for the recordset appears to be un-updateable. Since all of the fields you want to add to are in the tblAIRegister, I would use just the table rather than the query.

Code:
If MsgBox("Add to history ?", vbYesNo, "Add Record") = vbYes Then
        Set rSt = dbs.OpenRecordset("tblAIRegister")
        rSt.AddNew
        rSt!AIDate = Me.AIBullingDate
        rSt!TAG = Me.txtTAG
        rSt!AIBull = Me.txtBullName
        rSt!AIorBull = RecordType
        rSt!AIBullBreed = Me.Combo26
        rSt!Action = Action
        rSt!Notes = Me.txtNotes
        rSt.Update
End If
 
you hit the nail on the head there mate......coincidently i figured that out about an hour ago before realising you posted.

i noticed the query was unupdateable because of the animal register table and linked field in the qryAIRegister.

but why would that make it unupdateable ?

i am also racking my brains as to when i changed this and i think i remember. now i just need to make sure this doesn't affect anything else !

oh the joys of programming :)

many thanks for taking the time to look.
 
I'm not sure why it would become un-updateable, but it is not the first time I have run into it.

I'm glad you got it worked out. Good luck on your project.
 
i noticed the query was unupdateable because of the animal register table and linked field in the qryAIRegister.

but why would that make it unupdateable ?
If any qry has more than one join fld index set to Duplictes Yes (Allowed) then the qry is not updateable.

To check, run the qry and if not updateable, the * on the Navigation Button is grayed out.
 
I know this is a long dead topic, but, while searching for an answer to my problem with Error 3027, I found this thread.

In my situation, I changed the query from one table to another, but in design view I forgot to remove the first table on the table view. Even though it had no fields involved in the query, just it being there made the SQL get squirly.

Mike
 
If you left a table in the query and there was no join between that table and another table in the query, the query will return a Cartesian product of the two tables. So if you had 1000 records in 1 table and 500 records in the other, the query would return about 500,000 records (1000 x 500).
 
In my case, no fields were selected in the second table, so it was just sitting there. That's what gave me that error.

But, I did not know that, jz. Thanks!
 
Typically a query that returns a Cartesian Product will not be updateable. Are you trying to run an action query (update, append etc.)?

Can you post the SQL text of the query?
 

Users who are viewing this thread

Back
Top Bottom