[thelist] trying two passwords in ASP vbscript
David Turner
david.turner at synergy.tv
Thu Aug 21 04:08:02 CDT 2003
Hi all,
to allow my sql password to change, i am having to code in the old, and then
the new password, so i am using an On Error Resume Next line.
I am not sure if i have done this propertly though, could someone advise if
there is a neater or a preferred solution.
code follows....
cheers,
david.
----------------------------
Sub DBConnect
On Error Resume Next
Set Database_Connection = Server.CreateObject("ADODB.Connection")
' try old password
'
Database_Connection.Open "Driver={SQL
Server};Server=sql.mywebsite.com;Database=db;UID=db;PWD=old_password"
' and then the new password
'
Database_Connection.Open "Driver={SQL
Server};Server=sql.mywebsite.com;Database=db;UID=db;PWD=new_password"
End Sub
----------------------------
***************************************
Email: david.turner at synergy.tv
MSN ID: david_synergy at hotmail.com
Tel: +44 (0) 113 246 9989
Addr: 30-34 Aire Street, Leeds, LS1 4HT
www.synergy.tv
***************************************
____________________________________________________________________________
__
This e-mail is sent on behalf of Synergy Project Ltd trading as Synergy.TV
(www.Synergy.tv) Its contents are confidential to the intended recipient
and may be legally privileged. If you are not the intended recipient:
(1) you must not disclose, copy or distribute its contents to any other
person nor use its contents in any way;
(2) please contact Synergy.TV immediately on +44 (0)113 246 9989 quoting the
name of the sender and the addressee then delete it from your system.
Synergy.TV has scanned this e-mail for viruses but does not accept any
responsibility for viruses once this e-mail has been transmitted. You
should scan attachments (if any) for viruses.
_________________________________________________________________________
More information about the thelist
mailing list