Consultor Eletrônico



Kbase P129922: 4GL/ABL:  How to programmatically activate / deactivate Use Runtime Permissions Checking.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   02/02/2010
Status: Unverified

GOAL:

4GL/ABL: How to programmatically activate / deactivate Use Runtime Permissions Checking.

GOAL:

How to programmatically set or reset the Database Options / Security Options / Disallow Blank UserId?

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.x

FIX:

FIND _db-option WHERE _Db-Option._Db-option-code = "_pvm.noBlankUser" EXCLUSIVE-LOCK.
ASSIGN
_Db-Option._Db-option-value = "YES".
FIND _db-option WHERE _Db-Option._Db-option-code = "_pvm.RuntimePermissions" EXCLUSIVE-LOCK.
ASSIGN
_Db-Option._Db-option-value = "YES".

The following code programmatically reverses the above action:
FIND _db-option WHERE _Db-Option._Db-option-code = "_pvm.noBlankUser" EXCLUSIVE-LOCK.
ASSIGN
_Db-Option._Db-option-value = "NO".
FIND _db-option WHERE _Db-Option._Db-option-code = "_pvm.RuntimePermissions" EXCLUSIVE-LOCK.
ASSIGN
_Db-Option._Db-option-value = "NO".
If you have more than one database connected when you do this, then you can find the correct _Db record and use the RECID of that _Db in the FIND like this:
FIND _DB where _DB._Db-name = "YourDatabaseName" NO-LOCK.
FIND _db-option WHERE _Db-Option._Db-RECID = RECID(_Db)
AND _Db-Option._Db-option-code = "_pvm.noBlankUser" EXCLUSIVE-LOCK.

However, although it is possible, Progress does not support doing this, since this is directly manipulating the hidden underscore database schema tables, and we only support modifications to these when they are done via the Progress utilities. Customers may want to use it, but if issues should arise, it would need to be determined whether or not the same issue arose when using the supported utility.