Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-10-25
6
Medium Priority
?
177 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Accepted Solution

by:
Kelvin Sparks earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

772 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