Solved

#DELETE in all fields of All rows in linked SQL Server table

Posted on 2013-12-09
4
5,349 Views
Last Modified: 2013-12-09
Been migrating some Access data to SQL Server lately.   Experienced a previously unencountered experience this morning.

Opened a table in Access that contained #DELETED in every field and every row of a linked SQL Server table.  Went to SQL Server, and all of the data I imported to the table yesterday is there.  Went back to Access, deleted the linked table, performed a Compact and Repair, closed the database, opened the db, relinked the SQL Server table and still have the same problem.

all of the other tables linked to that SQL Server are working correctly, and the one that is experiencing a problem only has about 2000 records.

Any ideas?
0
Comment
Question by:Dale Fye (Access MVP)
  • 3
4 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
Comment Utility
Dale,

Try adding a TimeStamp column to the table.  As for why, take a look at these two MSKB articles:

PRB: Explaining "Record is deleted" error accessing ODBC table
http://support.microsoft.com/kb/172339

"#Deleted" errors with linked ODBC tables
http://support.microsoft.com/kb/128809

which explains why this occurs and things you can do to avoid the problem.

Jim.
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
There's also a work around where you can define an index on the Access side if there is no unique index on the SQL side.

Optimizing Microsoft Office Access Applications Linked to SQL Server
http://msdn.microsoft.com/en-us/library/bb188204.aspx

See the section "Adjusting Dynaset Behavior"

Jim.
0
 
LVL 47

Author Closing Comment

by:Dale Fye (Access MVP)
Comment Utility
Jim,

Thanks.  The table already had a unique ID field that was defined as the primary key, and a timestamp field.

However, after reading the references, I went back to the table design and realized that the ID field was a bigint, not an integer.  I believe that was the problem as the new table using int instead of bigint is working properly.

Dale
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
That will do it!

Jim.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

744 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

12 Experts available now in Live!

Get 1:1 Help Now