Kbase P15745: How do I add a user to the database programmatically with 4GL code?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  13/11/2008 |
|
Status: Verified
GOAL:
How do I add a user to the database programmatically with 4GL code?
GOAL:
How to interactively add a user to the database using 4GL code?
FACT(s) (Environment):
All Supported Operating Systems
Progress 8.x
Progress 9.x
OpenEdge 10.x
FIX:
This procedure programmatically creates a new user. It prompts the user to input the User Id, Name and Password and uses the data input by the user to create a new record in the _User table.
DEFINE VARIABLE cUserid LIKE _User._Userid NO-UNDO.
DEFINE VARIABLE cUsername LIKE _User._User-name NO-UNDO.
DEFINE VARIABLE cPassword LIKE _User._Password NO-UNDO.
CREATE _User.
SET
cUserid
cUsername
cPassword.
ASSIGN
_User._Userid = cUserid
_User._User-name = cUsername
_User._Password = ENCODE(cPassword).