473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

SQL linked tables in Access FE occasionally go read only

Hi,
Not sure if this is Access, SQL or ODBC. I have a SQL database with an
Access Front End. They are linked with ODBC. Occasionally (it's
happened 3 times in 4 months) some of the linked tables in Access
become read only and I can't add new records to them. If I go into
design view (in Access) the tables have lost their Primary Key. In
SQL, they still work just fine. The only way I have found to get the
links working again is to delete the link and recreate it.

This doesn't happen on all of the tables that are linked, and I
couldn't even say that its all of the tables with Primary Keys.
However, it does seem to be the same few tables each time. It happened
this morning on a Test version of my database, which only ever has one
user. Still the same tables.

Can anybody offer any suggestions?

Thanks a lot

Colin

Jun 14 '07 #1
2 8235
Bobby wrote:
Hi,
Not sure if this is Access, SQL or ODBC. I have a SQL database with an
Access Front End. They are linked with ODBC. Occasionally (it's
happened 3 times in 4 months) some of the linked tables in Access
become read only and I can't add new records to them. If I go into
design view (in Access) the tables have lost their Primary Key. In
SQL, they still work just fine. The only way I have found to get the
links working again is to delete the link and recreate it.

This doesn't happen on all of the tables that are linked, and I
couldn't even say that its all of the tables with Primary Keys.
However, it does seem to be the same few tables each time. It happened
this morning on a Test version of my database, which only ever has one
user. Still the same tables.

Can anybody offer any suggestions?

Thanks a lot

Colin
Those tables do not have primary keys (or a unique index) on the SQL Server.
When creating a link to such a table Access will prompt you for the fields to
use so it can build a local index. If you skip that step the link will be read
only. If you DO select the appropriate fields then the link will be editable.

Now, if you later refresh that link, either in code or with the linked table
manager that information for the local index is discarded and the link reverts
to read only. The best solution of course is to add a PK to those tables on the
SQL Server.

Don't be confused by the "key icon" you see if you look at a link in design
view. That "might" be the PK defined on the server or it migth just be the
fields that were selected when the link was created.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jun 14 '07 #2
>
Those tables do not have primary keys (or a unique index) on the SQL Server.
When creating a link to such a table Access will prompt you for the fields to
use so it can build a local index. If you skip that step the link will be read
only. If you DO select the appropriate fields then the link will be editable.

Now, if you later refresh that link, either in code or with the linked table
manager that information for the local index is discarded and the link reverts
to read only. The best solution of course is to add a PK to those tables on the
SQL Server.

Don't be confused by the "key icon" you see if you look at a link in design
view. That "might" be the PK defined on the server or it migth just be the
fields that were selected when the link was created.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com- Hide quoted text -

- Show quoted text -
Once again thanks a lot Rick. The tables that fail do not have Primary
Keys in SQL as you suggested. However, when I try to assign them a PK,
I get the following error:

'Cutting List' table
- Unable to create index 'PK_Cutting List'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]There is
already an object named 'PK_Cutting List' in the database.
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not create
constraint. See previous errors.

Cutting List is the name of the table.

The reason for the above error is as follows: I also have a table
called Cutting List1 with a Primary Key which was created before we
went live. I suspect that what has happened is that Cutting list1 was
originally called Cutting List but then was renamed. Cutting List was
then created wihout a Primary Key. It appears that PK_Cutting List is
actually the primary key of Cutting list1. I have proven this by
deleating the Primary Key from Cutting list1. I am now able to create
a Primary key for Cutting List.

Phew! Thanks again

Colin

Jun 14 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
0
by: smd | last post by:
Hello and thanks for taking the time to read this. I've looked all over the web and newsgroups and can't find a solution to my problem. Since the source of the data is DB2, I figured I'd give you...
2
by: Bruce | last post by:
Greetings! After finally figuring out that the Linked Table manager is no longer an add-in in Access 2003 I now discover that it does not display any of my linked tables in the 'select linked...
4
by: Neil Ginsberg | last post by:
I have ODBC linked tables to a SQL 7 database in an A2K database. The linked tables do not have the password stored in them, so the first time the user accesses them, they need to enter the SQL...
15
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size (cache??)/number of records showing in Access? ...
24
by: Bob Alston | last post by:
Anyone know a way to make all access to a linked table, in another Access MDB, read only? I really don't want all the hassle of implementing full access security. I can't do this at the server...
7
by: smd | last post by:
Hello and thanks for taking the time to read this. I've looked all over the web and newsgroups and can't find a solution to my problem. I've posted this question to the Access 2000 group as well -...
2
by: Jill Elaine | last post by:
I am building an Access 2002 frontend with linked tables to an encrypted Paradox 7 database. When I first create these linked tables, I'm asked for the password to the encrypted Paradox database,...
10
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.