Can the displayed dialogs produced by PWDialog and PWExpDialog be modified?

1
0
-1

Using Appeon PowerBuilder 2017 Build 1666 on Windows 7 with Oracle 12c full client connecting to remote Oracle 12c.

We are just looking at using PWDialog and PWExpDialog to handle expiring/expired passwords.  I have not been able to find much on the Web about them so am posing my question here.

We would like to be able to display the password requirements when an operator is asked to enter a new password because of an expiring/expired password.  Is there anyone who knows if this can be accomplished using these dbparms arguments, and if so, how?  If this is not possible, has anyone coded a solution for this issue that they would be willing to share?

Thanks very much for the ongoing, excellent assistance from the PowerBuilder community.

Aubrey

Question Tags: 

Answers

Neil Garcia answered Can the displayed dialogs produced by PWDialog and PWExpDialog be modified?

1
0
-1

With Oracle, you can capture the SQLDBCODE 28001 that indicates the user's password is expired. 

One way is to create you own change password window. The downside with this is that you need a service account that has the appropriate permission to change the user password. Most likely the password of the service account will be hard coded in the application and should not expire. The upside is that you can add additional user verifications for the user identity and you are also able to log the activity.

So, basically it would be like:

CONNECT USING SQLCA;

If SQLCA.SQLDBCODE = 28001 Then

    // connect using the service account

    // open w_changepassword window. So this is now your custom change password dialog window and you can add any validations/verifications you want.                 

   // log the activity

    // disconnect

    // back to the login prompt

End If

Another way is to still capture the SQLDBCODE 28001 (with no PWDialog yet). If you get that code, display the password requirements (could be a message box or a response window). Then re-set the SQLCA.DBPARM to include the PWDialog parameter and then reconnect.

So, it’s like:

CONNECT USING SQLCA;

If SQLCA.SQLDBCODE = 28001 Then

    // display password requirements

   // SQLCA.SQLDBPARM = SQLCA.SQLDBPARM + ‘ PWDialog=1’

   CONNECT USING SQLCA;

End If