1. Aubrey Eichel
  2. PowerBuilder
  3. Friday, 4 August 2017 17:10 PM UTC

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

Neil Garcia Accepted Answer Pending Moderation
  1. Friday, 4 August 2017 22:11 PM UTC
  2. PowerBuilder
  3. # 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

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 4 August 2017 18:08 PM UTC
  2. PowerBuilder
  3. # 2

You can not display the dialogs and display your own window when you get the connect error.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.