Solved

Access ODBC can't edit all the tables

Posted on 2011-09-04
6
315 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:murbro
6 Comments
 
LVL 19

Accepted Solution

by:
MINDSUPERB earned 167 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 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 167 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 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 166 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
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.

 

Author Closing Comment

by:murbro
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:murbro
ID: 36509969
Thanks very much for the additional information.
0

Featured Post

What Security Threats Are You Missing?

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

743 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

11 Experts available now in Live!

Get 1:1 Help Now