LotusScript Help needed to calulate database size for quota mgt

I would like to turn on the quota method “Check Space used in file when addind a note”. I would also like to create a quota display bar that shows my users the exact current database size without doing the math themselves. Any help is greatly appreciated!

Subject: LotusScript Help needed to calulate database size for quota mgt

these are the basics.

Size = Database.Size

Used = Size * Database.PercentUsed / 100

Quota = Database.SizeQuota * 1024

// check for a quota of zero or you’ll get a divided by 0 error on the next line

PercentQuota = Used / Quota * 100

don’t forget that if your users have local replicas of their mail files then the results are pointless, you’ll need to save it to a profile document (scheduled agent) and reference that instead if you want to display the information correctly at all times.

Subject: RE: LotusScript Help needed to calulate database size for quota mgt

Great! Thx!

Subject: LotusScript Help needed to calulate database size for quota mgt

Several different ways already posted on internet:

From searchdomino.com

http://searchdomino.techtarget.com/tip/1,289483,sid4_gci785661,00.html

http://searchdomino.techtarget.com/tip/1,289483,sid4_gci844663,00.html

Here’s a search I did in the Sandbox on the word “size”, might have something useful for you in there.

http://www-10.lotus.com/ldd/sandbox.nsf/Search?SearchView&Query=size&SearchOrder=1&SearchMax=0&SearchWV=FALSE&SearchFuzzy=FALSE&Start=1&Count=10

Subject: LotusScript Help needed to calulate database size for quota mgt

Hi Sonia,

Dim db As NotesDatabase

Dim session As New NotesSession

Set db = session.CurrentDatabase

Msgbox "Database size is: ", db.Size

Msgbox "Database Quota is: ", db.SizeQuota

Msgbox "Database Maximum Size is: ", db.MaxSize, “K”

try this code logically to control and put the size bound for any database.

Sumit

sumitkblr@yahoo.co.uk