Solved

#Deleted Problem with MS Access and MS SQL

Posted on 2013-05-10
5
364 Views
Last Modified: 2013-11-20
Hello Experts,

I'm using MS Access 2000 as my front end and MS SQL Server as the backend (I believe it is 2008 R2).

I have a table with 3 million record that is giving me trouble.  At least part of the table has become currupt and the prhase #Deleted now appears in every field of a specific row.

The problem record can be displayed if I run this query:
SELECT CompPricing.Manufacturer, CompPricing.*
FROM CompPricing
WHERE (((CompPricing.Manufacturer) Like "*hHQp*"));

However, when the query results appear the work #Deleted appears in every field.

If I attempt to delete the row from the query, the system acts as it would if I were actually deleting a row, except that no deletion ever takes place.

I'm using ODBC to connect to the MS SQL Server.

I logged into the MS SQL server and attempted to manually delete the record.
As before, the system responded as it would if the record was deleted,
although no deletion took place.

The deleted record is causing other routines to fail so I can not ignore it .

Please HELP!

Thank you
0
Comment
Question by:pcalabria
  • 2
  • 2
5 Comments
 
LVL 57
ID: 39155499
<<I have a table with 3 million record that is giving me trouble.  At least part of the table has become currupt and the prhase #Deleted now appears in every field of a specific row.>>

 #Deleted does not mean the table is corrupt.

 #Deleted is used by JET to indicate that it can no longer find the row.

 This can be caused by numerious things.

 First, add a timestamp column to the table, whcih turns on row versioning and then re-link the table in Access.  That takes care of it in most cases.

 If not, we'll need to look at a little more in detail.

Jim.
0
 
LVL 6

Expert Comment

by:BurundiLapp
ID: 39155500
Have any triggers been added to the affected tables recently?  It could be a badly coded trigger at fault here.
0
 

Author Comment

by:pcalabria
ID: 39156518
Jim,

I'm not sure what a timestamp column is.  What data goes in the column?  No triggers.
0
 

Author Comment

by:pcalabria
ID: 39156702
I figured out what a timestamp is, but it turns out I have had one all along.

I deleted the link to the table, then recreated it, and have the same problem.

I also deleted the ODBC connect and reconnected... same prolem.

Any iteas?
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39158007
<<If I attempt to delete the row from the query, the system acts as it would if I were actually deleting a row, except that no deletion ever takes place.>>

 This and #Deleted are usually indications that a unique index is not available or that the key that the record is based on is being changed by a trigger.

  To understand how JET works with ODBC datasources and why #Deleted can occur, have a read through this:

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

there is also a slightly updated version of that here:

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

also, since this is Access 2000, it may be a result of this:

ACC2000: Linked SQL Server Table That Uses BigInt Data Type as Primary Key Displays #Deleted
http://support.microsoft.com/kb/321901

 Take a read through those and see if anything might pertain.  Also, I'd check if your up to date on service packs.

  There is one other problem that used to exist with JET 4.0, but that would give you #Deleted in every other row.  Once again however, it relates to the primary key being used and how JET works with it's ODBC keyset cursors.

Jim.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

In this article I will describe the Backup & Restore 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.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

856 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