How To calculate database usage?Author: Luc Van Dyck
Sometimes you want to give a warning when database usage is getting close to the database size.
eg. For large batch operations, it becomes almost impossible to execute properly, when the database
has reached 99% of the database size.
Therefore you need to calculate the database usage and database size, using C/AL code.
These routines does just that, but they can't be 100% accurate. This is caused by BLOB-fields in objects, as
they are stored in a compressed form (by using a pkzip algorithm and removing 0's and trailing blanks). Hence
there is a difference in the used (KB) figures according to the Database - Information form.