Compression of appendices
Still, when started to write on Access 97, there was a question how periodically to compress a database? During work it strongly enough swelled. Decisions was a little, but all of them for whatever reasons were not optimum.
- To give the user access to full menu Access, that it could compress base not so well. It can change any important installation.
- To deliver with base utility JetCompact too did not give a desired effect. The utility often lost, forgot to transfer or establish together with base, At use of protection, it was required to set additional parameters. Besides many users were so to say, " not qualified".
- Use of parameters of a command line/compact and repair demanded accommodation on a desktop additional icon and sometimes forced down the user if at icon there was an identical image. Automatic creation icon on a desktop demanded additional knowledge in programming, and in manual to create was not always possible. Though it also was in my opinion the most correct way of maintenance of the user the tool for compression of base.
- Every possible program shifts on the basis of Access and VBScript. Every possible scripts for start of the program on compression were generated, programm buttons on which commands on compression were hung up were created, special programs (mdb) copress were created. If find on forums that it is possible to find many traces of this activity.
With the advent of Access 2000 situation has a little improved. In parameters of base there was a tag « To compress at closing ». Constant сжимание bases though allowed to minimize volume of base, but slowed down work (in and-not those it was discussed). One expectation of end of compression, especially when the volume of base has passed for 10 Mb, can помотать to the user nerves (and it, naturally, помотает to you). Here if it was possible to operate this tag from the program. Then it is possible to give the instruction on compression of a file of base at closing, and at opening base, to dump(reset) installation of a tag. So it is possible to realize unitary compression of base. It is possible to write the subroutine of compression of base under the schedule. It is necessary to learn only how it can be made. It appears to make it very simply. Only two lines of a code
SetOption "Auto Compact", True ' to include
и
SetOption "Auto Compact", False ' to switch off
Now one line should be hung up on the button of inclusion of compression of a file, and the second to insert in макрос AutoExec or the starting form. And all is ready.
Автор: Dmitry Sonnykh (aka Joss)
Is added: 30.07.2007