Solved

Access User can't modify a record added to a linked SQL Server table

Posted on 2016-10-25
6
32 Views
Last Modified: 2016-10-25
I have a linked table in Microsoft Access 2003 that's linked to a table in SQL Server 2012.  The user specified in the connection has datareader permissions for the database in SQL Server, and for this one table has Grant permissions for Select, Update, and delete.  I can modify existing records and add a new records using this linked table, but I can't modify or delete records that *I* added using the linked table.  It gives me a message that the record was edited by another user when I try.  How can I fix this?
0
Comment
Question by:Declan_Basile
  • 3
  • 3
6 Comments
 
LVL 22

Expert Comment

by:Kelvin Sparks
ID: 41859394
Firstly, you don't specify the INSERT grant - is that present?

Secondly, how are you altering these records - via VBA, directly into the linked table - or via a form?


Kelvin
0
 
LVL 1

Author Comment

by:Declan_Basile
ID: 41859408
The user in the connection string has Insert, update, and delete permissions granted for this table.  I'm trying to update the record directly in the linked table and I'm getting a write conflict.  Also, I found out that if I add a record to the table under sa in SQL Server I still can't delete it or modify it in the linked table.  However, already existing records I can modify directly in the linked table.
0
 
LVL 1

Author Comment

by:Declan_Basile
ID: 41859417
I think I figured it out.  The table had a series of bit fields with no default values and "allow null" set.  I changed these fields to have a default value of "0" and now the users can edit and delete new records.  It wouldn't allow users to modify or delete records if the record had a null value for a bit field.  Did you ever hear about this limitation?
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 22

Accepted Solution

by:
Kelvin Sparks earned 500 total points
ID: 41859420
Yes, an Access record is "read only" if it has a bit value that is not set - it must be o or 1 to allow the record to be edited. Well done for sorting it out.


Kelvin
0
 
LVL 22

Expert Comment

by:Kelvin Sparks
ID: 41859422
It's a common oversight when migrating a database from Access to SQL Server. Generally any table built in SQL will have a default value set at the table level and be set to NOT NULL.


Kelvin
0
 
LVL 1

Author Closing Comment

by:Declan_Basile
ID: 41859490
Thanks.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now