Change Database Password

Discussions specific to Team Developer 5.1.

Change Database Password

Postby brawnr » Tue Dec 07, 2010 4:15 am

Hello,

We are using TD2005.1 to connect to an Oracle 10g database via SQL router. We have a requirement to alter our login screen so that the user can change their database password. Apologies if the answer is really obvious (I haven't used TD for over 4 years) but I cannot see how we can change the user's database password via the standard functions. I was half expecting the SQLConnect function to take an old/new password parameter, or for there to be a specific function e.g. SQLChangePassword, but this doesn't appear to be the case.

I'd be grateful if anyone could point me in the right direction.

Thanks
Rob.
brawnr
 
Posts: 2
Joined: Tue Dec 07, 2010 4:05 am

Re: Change Database Password

Postby jmcnamara » Tue Dec 07, 2010 11:35 am

Code: Select all
 SqlPrepareAndExecute( hSql, 'alter user :SqlUser identified by :NewPassword replace :SqlPassword' )
jmcnamara
 
Posts: 117
Joined: Thu Dec 13, 2007 9:39 am

Re: Change Database Password

Postby brawnr » Wed Dec 08, 2010 3:58 am

Thanks for the reply. I was begining to think that was the way to do it.

The DBAs are going to be turning on password expiry as part of this change. So what do you do when the user's password has expired? If the connect to the database fails due to expiry, I have no way of issuing an 'alter user' statement as I have no database connection.
brawnr
 
Posts: 2
Joined: Tue Dec 07, 2010 4:05 am


Return to Team Developer 5.1

Who is online

Users browsing this forum: No registered users and 1 guest