AccpacMultiuser.RegradeOrg
Upgrades (from shared to exclusive) or downgrades (from exclusive to shared) a lock on an organization's database.
Function RegradeOrg(
OrgID As String,
Upgrade As Boolean) As tagMultiuserStatus
Parameters
OrgID
[in] organization (database) ID of the database whose lock is being upgraded or downgraded
Upgrade
[in] flag indicating whether the program's lock on the organization's database should be upgraded (TRUE) or downgraded (FALSE)
Return Value
Returns the status of the call.
Remarks
If possible, avoid using this method. Lock manipulation should be done by views rather than by UIs. Lock manipulation (by the UI or macro) is especially dangerous when ACCPAC is running remotely over the Internet.
Before calling RegradeOrg, the program must have already locked the organization's database by calling LockOrg. Calls to RegradeOrg may be nested. If a program initially has shared access to the organization's database, nested calls to RegradeOrg to upgrade and then restore the program's lock on the organization's database will result in the database being locked exclusively until the outermost level of nested calls restores the lock, returning it to shared access.