Solved Run-time error 3027 Again (1 Viewer)

Ashfaque

Student
Local time
Today, 06:59
Joined
Sep 6, 2004
Messages
732
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

error reading drive A:
Local time
Today, 09:29
Joined
May 7, 2009
Messages
12,011
did you add the PK on the form?
 

Ranman256

Well-known member
Local time
Yesterday, 21:29
Joined
Apr 9, 2015
Messages
3,807
Do you have add rights to the table?
Does the form have allow Additions property=yes?
 

Ashfaque

Student
Local time
Today, 06:59
Joined
Sep 6, 2004
Messages
732
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, 02:29
Joined
Jul 26, 2013
Messages
8,173
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
Today, 06:59
Joined
Sep 6, 2004
Messages
732
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: 14
  • Tbl In Access - Not Updatable.jpg
    Tbl In Access - Not Updatable.jpg
    70.8 KB · Views: 12

arnelgp

error reading drive A:
Local time
Today, 09:29
Joined
May 7, 2009
Messages
12,011
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, 02:29
Joined
Jul 26, 2013
Messages
8,173
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
Today, 06:59
Joined
Sep 6, 2004
Messages
732
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