Kbase P53460: Escaping a database startup login dialog ends up in the Procedure Editor?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/12/2003 |
|
Status: Unverified
FACT(s) (Environment):
Windows
Progress 8.x
Progress 9.x
SYMPTOM(s):
Escaping a database startup login dialog ends up in the Procedure Editor?
Starting the Progress session from a shortcut that includes a database connection to a database that does not allow blank users.
The default database user login dialog box comes up as expected. If the user enters the ESC key the Procedure Editor starts.
CAUSE:
This is the default Progress behavior under the conditions described above.
FIX:
Write a custom login procedure that does not start the database from the icon command line but rather from inside the procedure. This procedure can then test if the user is authorized or not. If authorized the the procedure editor is opened or some other program is run. Otherwise the whole session is closed. Such customized login window would connect to the database in the main block and validate the user's credentials after they enter their user id and password into the window using code along the following lines:
DO:
ASSIGN
tries = tries + 1
id = cUserId:SCREEN-VALUE
password = cPassword:SCREEN-VALUE.
IF NOT SETUSERID(id,password,"DICTDB") THEN DO:
MESSAGE "Sorry, userid or password is incorrect. Please try again!"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
IF tries > 3 THEN QUIT.
tries = tries + 1.
END.
ELSE
/*** Here you can actually run something else other than the procedure editor which is the default ***/
/*** RUN someOtherProgramName.p ***/
APPLY "CLOSE":U TO THIS-PROCEDURE.
RETURN NO-APPLY.
END.