I have a .Net Web application that sources data from Teradata via ODBC. Users logon via their own DWH account. Unfortunately when a user's password expires the normal password change box doesn't pop up for the user. This causes the application to hang. (I'm guessing the message is appearing on the server). Does any one know how I can trap this event and deal with it.
- run ODBC Driver in silent mode. Either check the DSN option "Run in Quiet Mode" or use "QUIETMODE=Yes;" in the connection-string. This prevents the dialog box to be displayed on the server, and ODBC driver returns an error to let application handle the situation.
- if application wants to modify password on-the-fly silently, use "PWD=current;PWD2=new password;" in the connection-string. ODBC driver modify the current expired password with the one provided for PWD2. There after, the password for the user will be the one provided thru PWD2.
.NET Data Provider for Teradata ( NOT Microsoft Data Provider for ODBC) fires InfoMessage events when password is expired. Therefore you can trap the "Password Expired" event and prompt the user for new password.
See "Expired Password" in .NET Data Provider for Teradata help file in "Developers Guide"->"Working with Provider Features"->"Authentication, Integrity, and Privacy"->"Expired Password".
I suggest switching from Data Provider for ODBC to .NET Data Provider for Teradata.