Today, I made an Access database compressed function. I found that I can't execute the operation of the compression function in my own procedure. After the study, I found the final solution:
I used the MDI form, there is a main form, there is an adocoonection component, I set the connection status to true; where is the compressed code, I first closed the join, using the code adocoon.connected: = false; find unable Disconnect, Access Temporary files still exist; after studying, set the connection of the Adocoon component to false, but join in the form creation code
Procedure tfrmmain.formcreate (sender: TOBJECT); begin adocoon.connected: = true; end; This program can normal ACCESS compression operation!