Permissions Property Example (VC++)

This example prints the Permissions property setting of a Document object for the current user.

CdbDBEngine   DBEng;
CdbDatabase   dbsNorthwind;
CdbDocument   docTest;
Cstring      stPermission;

dbsNorthwind =  DBEng.OpenDatabase(_T("Northwind.mdb"));
docTest = dbsNorthwind.Containers[0L].Documents[_T("MyDoc")];
stPermission.Format(_T("%f"),docTest.GetPermissions());
printf ("%s\n", stPermission);