I have an application in vb and access.
is there any solution to compact-repair access database automatically when no user is accessing software.
Printable View
I have an application in vb and access.
is there any solution to compact-repair access database automatically when no user is accessing software.
Automatically... No. You would have to write a function to determine when no one is using it and compact it then.
Maybe you can copy the database sort of backup to a different folder. Then do the compact and repair there. Once your done, overwrite it to the main database.
no i want some automatic repairing..or i will give a time at which no-one is using software.
Then I would suggest following this adviceQuote:
Originally Posted by shukla
Quote:
Originally Posted by randem
Or require users to log into and out of your program. You could do a compact on logout, and if anyone tries to log in while you're compacting, you could raise a message box telling them that the database is undergoing auto compact and repair and they'll have to wait. If you have an idea how long your normal compact takes you could even start a timer when you start compacting and tell them about how much longer it will be until they can log in.
Or you could reset a timer at every keystroke and, if the timer runs out (you'd have to determine how long you'll allow a user to stare at the screen before you consider him to be "not using" the database) you run your compact and repair, locking the user out until it's done.