How to get db.quota of local db

I set the quota size of mail db on the server use Administrator Client.when mail db on the online location,the db.size and dbused(dbsize/db.quota) show is ok.I new a replica of one db to the local disk.I open it,the dbsize is ok,but dbsize is 0.I guess on the local the db.quota is 0, how i can fix this ?thanks in advantage.my code under: Dim session As New NotesSession

Dim db As NotesDatabase

Dim dbsize As Double

Dim dbsizequota As Double

Dim dbused As Double

Set doc=source.Document

Set db = session.CurrentDatabase

dbsizequota=db.SizeQuota 'DB SizeQuota

dbsize=db.Size 'DB Size

doc.dbsize =Cint(dbsize/1024/1024)

If db.SizeQuota=0 Then

dbused=0

Else

dbused=(db.Size/db.SizeQuota/1024)*100

End If

doc.dbused=Cint(dbused)

End Sub