Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Table via ODBC is damaged

Status
Not open for further replies.

apinzon

Programmer
Jan 30, 2001
3
PR
Hello,

I got a problem with one SQL table that I access via ODBC in MS Access 2000.

This table have 2200 records but using a query appears 4028 records.

Those are records with the #deleted# tag in every field.

The problem is when I try to add records that are supposed deleted, I got an error "duplicate key value"
because that value is in a record with the #deleted# tag.

How can I restore those record that I think are corrupted.
Or How can I remove those records?

I never delete or try to delete those records and The "#deleted#" records are growing up.

In a query sorted by the index appears the deleted record with a value in the index field different from the original value.

Example of the query with the index field in ascending.

Index Field Name
1 Record 1,,,
2 Record 2,,,
3 Record 3,,,
4 Record 4,,,
3934934 #deleted#, #deleted#
6 Record 6,,,
7 Record 7,,,
9678658658 Record 8,,,
9 Record 9,,,
...
 
This reminds me of something I read... Make sure you have a unique index over one of the fields in the SQL table. Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top