Solved Run-time error 3027 Again (1 Viewer)

Ashfaque

Student
Local time
Tomorrow, 02:51
Joined
Sep 6, 2004
Messages
894
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.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:21
Joined
May 7, 2009
Messages
19,169
did you add the PK on the form?
 

Ranman256

Well-known member
Local time
Today, 17:21
Joined
Apr 9, 2015
Messages
4,339
Do you have add rights to the table?
Does the form have allow Additions property=yes?
 

Ashfaque

Student
Local time
Tomorrow, 02:51
Joined
Sep 6, 2004
Messages
894
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.
 

Minty

AWF VIP
Local time
Today, 21:21
Joined
Jul 26, 2013
Messages
10,355
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.
 

Ashfaque

Student
Local time
Tomorrow, 02:51
Joined
Sep 6, 2004
Messages
894
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: 172
  • Tbl In Access - Not Updatable.jpg
    Tbl In Access - Not Updatable.jpg
    70.8 KB · Views: 156

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:21
Joined
May 7, 2009
Messages
19,169
as said, you need to include the PK in access, otherwise SQL server won't
distinguish which record you are trying to edit/creaate.
 

Minty

AWF VIP
Local time
Today, 21:21
Joined
Jul 26, 2013
Messages
10,355
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.
 

Ashfaque

Student
Local time
Tomorrow, 02:51
Joined
Sep 6, 2004
Messages
894
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

Top Bottom