Problem with MS Access request after operation "Compact and repair"

I have an Access application that uses the classic front-end / back-end approach. The backend was damaged yesterday for a reason I don’t know about. So I opened the backend with Access 2003, and access asked me if I want to restore the file, I said yes, and it seemed to work.

I can open the database, see the contents of the tables and execute most of the queries.

However, there is an access request that does not work with a specific where clause.

Example:

// This works in the original DB, but not in the compacted one :
SELECT a, b, c 
FROM tbl1 INNER JOIN tbl2 ON tbl1.d = tbl2.d 
WHERE e = 3 AND tbl2.f = 1;

// This works in both the original and the compacted one :
SELECT a, b, c 
FROM tbl1 INNER JOIN tbl2 ON tbl1.d = tbl2.d 
WHERE e = 3;

, . . , Ctrl + Break, . , .

showplan.out ( , )

. . mdb, ( ).

- ?

+3
5

, , , -. MSysCompactErrors - / Tools | | VIEW.

Jet MDB . - COMPACT ON CLOSE , , , MDB.

+2

, Access , . , . , , ( ) .

, , , , Access . - ?

+1

( ..) , .

( ). , .

0

tbl2.f?

Also try going to this table as a data table, sorting tbl2.f in ascending order and see if there is anything really strange in the first or last record.

0
source

Do you have access to install SQL Server? You can use the Upsizing Wizard in the Tools → Database Utilities menu to copy data to SQL Server and see if you have the same problem.

-1
source

Source: https://habr.com/ru/post/1710071/


All Articles