Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access ODBC can't edit all the tables

Posted on 2011-09-04
6
Medium Priority
?
326 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

610 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