?
Solved

Access ODBC can't edit all the tables

Posted on 2011-09-04
6
Medium Priority
?
324 Views
Last Modified: 2012-06-21
Hi

I have an ODBC link to an SQL table in Access.
I am able to edit some of my tables, but can't edit all
of them, particularly the larger ones. What causes this.
Some of the tables that can't be edited don't have key fields.
Would this cause these sorts of problems?
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 19

Accepted Solution

by:
MINDSUPERB earned 668 total points
ID: 36480299
"Some of the tables that can't be edited don't have key fields.
Would this cause these sorts of problems? "

The key fields are very important in table relationship. If your forms are source from a query whose tables have no PKs, you will have troubles editing or editing data on those tables.

Sincerely,
Ed
0
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 668 total points
ID: 36480503
SQL Server (and most other server-type database engines) require that you have a Primary Key defined on the table in order to be able to edit them. Note that when you link a SQL table, you can define a "unique index" on that table, which may allow you to actually update it. You can try adding an index to your linked table (Access will complain, but try it anyway) and see if that resolves it. If not, then you'd have to modify the SQL table to include a primary key.
0
 
LVL 58

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 664 total points
ID: 36480690
<<If not, then you'd have to modify the SQL table to include a primary key. >>

 Or just add a timestamp field, which allows Access to to row versioning and be able to update the table.

Jim.
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!

 

Author Closing Comment

by:Murray Brown
ID: 36498006
thanks very much
0
 
LVL 22

Expert Comment

by:dportas
ID: 36509942
Just to correct something that was said above. SQL Server (as with any SQL DBMS) does not require a primary key to allow you to update a table. That's a limitation imposed by Access linked tables - unless you use SQL passthrough or stored procedures you can't normally update a table without an identifiable uniqueness constraint. It is of course a good idea to ensure that every table has a key anyway! :)
0
 

Author Comment

by:Murray Brown
ID: 36509969
Thanks very much for the additional information.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

762 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