Search the web
Sign In
New User? Sign Up
fdb · FDB's "Advanced Programming" list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How you change the User password on the SQL server 6.5.   Message List  
Reply | Forward Message #53 of 103 |
How you change the User password on the SQL server 6.5.



Windows API/Global Declarations:


'**************************************
'Windows API/Global Declarations for :Ho
' w You Change The Password on SQL Server
'**************************************
Option Explicit
'Note : you need to refrence MS SQLOLE t
' o your project first
Global SQLServerx As New SQLOLE.SQLServer


'**************************************
' Name: How You Change The Password on S
' QL Server
' Description:How you change the User pa
' ssword on the SQL server 6.5.
' By: Adam Abas
'
' Inputs:User Name,
OldPassword,
NewPassword.
'
' Returns:Password changed.
'
' Assumes:SQL server 6.5 and VB 5, 6
'
' Side Effects:I don't know if there is
' any effected side.In my computer works f
' ine.
'
'This code is copyrighted and has' limited warranties.Please see http://w
' ww.Planet-Source-Code.com/xq/ASP/txtCode
' Id.1923/lngWId.1/qx/vb/scripts/ShowCode.
' htm'for details.'**************************************



Public Sub Changepassword()
Dim UserName As String * 20
UserName = "USER1" 'OR Get valid user name from the network using
'GetUserName From "advapi32.dll"
SQLServerx.DisConnect
SQLServerx.Connect ServerName:=SQLServer - Name, Login:="sa",
Password:=""
Dim MyLogins As SQLOLE.Login
On Error Goto Badpassword
'Note: old password must be valid passwo
' d for same above user on the SQL server


For Each MyLogins In SQLServerx.Logins


If MyLogins.Name = Trim(UserName) Then
MyLogins.SetPassword oldpassword:="123456",
NewPassword:="222222"
Else
End If
Next
Exit Sub
Badpassword:
MsgBox "Sorry,,Incorrect old password, try later or call SA.. !"
End Sub










Fri Jun 29, 2001 3:08 pm

ferialb@...
Send Email Send Email

Forward
Message #53 of 103 |
Expand Messages Author Sort by Date

How you change the User password on the SQL server 6.5. Windows API/Global Declarations: '************************************** 'Windows API/Global...
FDB & HRB
ferialb@...
Send Email
Jun 29, 2001
3:11 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help