Command SET RIGHTS CHECKING Professional
Set the security method used to open or create files.
SET RIGHTS CHECKING ON|OFF
This command allows to enable or disable the usage of connected user's access rights. By setting ON, the usage will be enabled, setting OFF forces ADS Server to ignore the connected user's rights and use its own access rights instead to perform File I/O operations on the file server.
Note that changing this setting will only affect newly opened workareas. Therefore it is possible to determine the method of security on a per-workarea basis.
See the function AX_RightsCheck() for further details.
#include "ads.ch"
// Load ADSDBE as default database engine.
PROCEDURE DbeSys
IF !DbeLoad( "ADSDBE" )
Alert( "ADSDBE could not be loaded!" )
ENDIF
DbeSetDefault( "ADSDBE" )
RETURN
PROCEDURE Main
// Connect to database server.
LOCAL cConnect := "DBE=ADSDBE;SERVER=\\ALASKA\VOL1"
LOCAL oSession := DacSession():new( cConnect )
IF .NOT. oSession:isConnected()
Alert( "Connection to server could not be established!" )
QUIT
ENDIF
SET RIGHTS CHECKING OFF // Use access rights of ADS Server
USE TEST1 NEW
SET RIGHTS CHECKING ON // Use access rights of connected user
USE TEST2 NEW
/*
* Operations...
*/
// Close databases and disconnect from server.
DbCloseAll()
oSession:disconnect()
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.