Skip to content

SET_MODEL_ACCESS_MODE ​

SET_MODEL_ACCESS_MODE can only be used in the OpenModel AdoScript-Event.

Syntax ​

leo-grammar
CC "Core" SET_MODEL_ACCESS_MODE modelversionid:intValue read-access:[0|1]

#-->RESULT ecode:intValue

Parameters ​

  • modelversionid (intValue) - the ID of the model version
  • read-access (boolValue) -

Returns ​

  • ecode (intValue) - Contains the error code or is 0 in case of success.

Details ​

If this command is called with "read-access:1" the model is anyway loaded with readonly access! It can be used to implement a Checkin/Checkout mechanism in ADOxx.

The AdoScript events must be customized into the library attribute "External Coupling".

See Also ​

Examples ​

asc
ON_EVENT "OpenModel"
{
  # queries the active user
  CC "Application" GET_USER

  if (user = "Readonly")
  {
    # only readonly!
    CC "Core" SET_MODEL_ACCESS_MODE modelversionid:(modelid) read-access:1
  }
}

Versions and Changes ​

Available since ADOxx 1.3