teradata and password expired!

Connectivity
Enthusiast

teradata and password expired!

...

UserName = "user1"

userpwd = "passw1"



Set CONN = New ADODB.Connection

CONN.CommandTimeout = 0

CONN.ConnectionString = "Data Source=Teradata Produzione;Database=DBH;UID=" & UserName & ";PWD=" & userpwd

CONN.Open

...



I use this code to connect a Tredata database.



Prob! when the password expire in the vb project appear a windows popup to tell me to change the expired password...!



Is possible via code when the pasword expire automaticlly use a new password and store for next use?



I have gogling and in a post i see to set int string connection a new PWD similar:



CONN.ConnectionString = "Data Source=Teradata Produzione;Database=DBH;UID=" & UserName & ";PWD=" & userpwd;PWD1=" & userpwd1

And when the old pasword expire the code use the new userpwd1



is this correct?

2 REPLIES
Senior Apprentice

Re: teradata and password expired!

When you simply look at the "ODBC Driver for Teradata User Guide" you'll find an option for SQLDriverConnect and SQLBrowseConnect() named "PWD2":

"If PWD2 is enabled, and the primary password has

expired, the driver will automatically use this

secondary password."

Enthusiast

Re: teradata and password expired!

ok...dnoet! tks for explain, but is really required the option:

;QUIETMODE=YES;

Actually i have, this connection string, yell me if is correct, tks in advance:

  Set CONN = New ADODB.Connection
    With CONN
        .CommandTimeout = 0
        .ConnectionTimeout = 0
        .CursorLocation = adUseServer
        .ConnectionString = "Data Source=Teradata Produzione;UID=" & UserName & ";PWD=" & userpwd & ";PWD2=" & userpwd1 & ";QUIETMODE=YES;"
        .Open
    End With