I am trying to connect to a SQL Database and retrieve an encypted password. I have it working without encrypted passwords just using strings thanks to another post that lead me to the MS example artical:

http://support.microsoft.com/default...b;en-us;308157

I am not sure what to change to use encryted passwords. Any help would be appreciated.

Here is what I have so far.

Code:
Function ValidateUser(uid As string, passwd As string) As Boolean
   Dim cnn As SqlConnection
   Dim cmd As SqlCommand
   Dim dr As SqlDataReader
   Dim retVal As Boolean = False
   cnn = New SqlConnection("server=localhost;uid=sa;pwd=password;database=Pubs;")
   cmd = New SqlCommand("Select * from users where uname = '" & uid & "'", cnn)
   cnn.Open()
   dr = cmd.ExecuteReader()
   While (dr.Read())
      If Strcomp(dr.Item("Pwd"), passwd, 1) = 0 Then 
         retVal = True
      End If	
   End While
   cnn.Close()
   ValidateUser = retVal
End Function