Solved Run-time error 3027 Again

Ashfaque

Search Beautiful Girls from your town for night
Local time
Today, 22:22
Joined
Sep 6, 2004
Messages
897
Hi,

I have an issue with my ODBC tbls.

When I open the tbl (footer tble) in server itself, it is permissible to add data. But when it is connected in Access, the footer form table doesn't allow to add record and produces the subjected error "Can not update. Database or Object is read-only" and stops at below code line of main form.
......
GetLastRec.Edit
......

Whereas the form which is on based on single table have no issue.

I have only 2 subforms that are attached in 2 difference forms. This has only issue. Single forms are working perfectly.

Kindly advise.
 
did you add the PK on the form?
 
Do you have add rights to the table?
Does the form have allow Additions property=yes?
 
Do you have add rights to the table?
Does the form have allow Additions property=yes?
Subform property Allow Addition + Deletion+ Edit....all are YES.

Sometime the server may disconnect with my db due wireless net connection. May be I am facing this because of Wireless connection?

But even when the net connection is full, it producing same error.
 
You have to have a primary or unique key defined when you link the table, if Access can't uniquely identify the record it can't identify the record in the query it send to the SQL server.

That is why Access always asks to specify a unique key when linking tables to a non-Access system, if there isn't one in the table.
 
I have attached 3 pics instead of writing again in details. You can see the footer table us updatable directly in server but not in Access. Please have look at the field type in pics and advise where is goes wrong.
 

Attachments

  • Header n Footer Tables FieldTypes.jpg
    Header n Footer Tables FieldTypes.jpg
    64.8 KB · Views: 238
  • Tbl In Access - Not Updatable.jpg
    Tbl In Access - Not Updatable.jpg
    70.8 KB · Views: 221
as said, you need to include the PK in access, otherwise SQL server won't
distinguish which record you are trying to edit/creaate.
 
To give you more reasoning - when you have the SQL table open in SSMS , SQL "Knows" what record you are on because you are directly editing the table effectively locally, and it can work it out without the PK or a unique index.

When access opens that table the ODBC driver cannot uniquely identify that record back to SQL Server, so blocks you from editing it, because it doesn't "know" which record it uniquely is.

The simple answer is to add an Autonumber PK to the child table, even if YOU don't use it, the ODBC will.
 
To give you more reasoning - when you have the SQL table open in SSMS , SQL "Knows" what record you are on because you are directly editing the table effectively locally, and it can work it out without the PK or a unique index.

When access opens that table the ODBC driver cannot uniquely identify that record back to SQL Server, so blocks you from editing it, because it doesn't "know" which record it uniquely is.

The simple answer is to add an Autonumber PK to the child table, even if YOU don't use it, the ODBC will.
Thanks A Lot Minty,
It working now.
 

Users who are viewing this thread

Back
Top Bottom