Solved

Access ODBC can't edit all the tables

Posted on 2011-09-04
6
316 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

911 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