Solved

#Deleted Problem with MS Access and MS SQL

Posted on 2013-05-10
5
367 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
[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
  • 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

Back Up Your Microsoft Windows Server®

Back up 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.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

735 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