Micron,
Code:
Is your db split? I don't see where you've clarified this. Code to detect a split, single user front end will always show it's in use, won't it? That can include the back end as well. If a FE has a connection, the BE is in use, even in a split db. Don't see how that's useful. A count of logged in users (from a user table) would tell you if there's any more than 1. AFAIK, there will always be at least regardless if it's split or not. I would not rely on the locked db file either (ldb in 2007).
i have tested it. If i had opened the back-end or front-end the file was locked and function returned true. If i went out - the function was false. So it is working.
Code:
The compact was only done if the file size exceeded the threshold.
I often use task sheduler also. How can you set up detecting if file size exceed the treshold in order to do compacting?
Thank you for your help!
Jacek