DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 23 Aug 2007 14:06:23 -0000,    posted on: microsoft.public.dotnet.languages.vb        back       

Thread Index
  1    ryan


validating a password string   
i am storing a usernames and passwords in a table called Users.

I present a login form to the user when my application starts up
(VB.NET, .NET CF, Windows Mobile 5)

The user chooses a username from a combo box that queries the Users
table. Then they type in a password string.

I then use the following code to validate the string when the user
clicks on the Submit menu item

Private Sub Submit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Submit.Click
        vUserName = Me.UserCombo.Text 'set variable for use later in
the app
        'MsgBox(vUserName)

        Dim vPassword2 As String
        vPassword2 =
CStr(Me.UsersTableAdapter.GetPassword(UserDataSet.Users, vUserName))
        'MsgBox(vPassword2)

        If vPassword2 <> Me.UserPassword.Text Then
            MessageBox.Show("Login Failed. Please try again.",
"Login", MessageBoxButtons.OK, MessageBoxIcon.Exclamation,
MessageBoxDefaultButton.Button1)
            'refill the username list with all options
            Me.UsersTableAdapter.Fill(UserDataSet.Users)
        Else
            Dim frmMainMenu As New SystemMenu 'create the system menu
class
            frmMainMenu.Show()

        End If
    End Sub

I am not able to get this to compare and validate the password string.
any advice, comments or experience would be most appreciated.

Ryan
Date:Thu, 23 Aug 2007 14:06:23 -0000   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us