Try this

sri sri replied to Timothy Purvis at 03-Jul-08 11:25
Hi,
Try the below query to check the username and password in a single query

Call ConnectRS(CN, RS, "SELECT name,password FROM staff where name ='" & txtName.Text & "' and password='" & txtPwd.Text & "'")

If RS.RecordCount = 0 Then
        MsgBox "Invalid Username and Password entered", vbCritical
        txtPwd.Text = ""
        txtName.Text=""
        CN.Close
        Call ConnectDB(CN, App.Path & "\users.mdb")
        Exit Sub
End If
RS.Close


Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  Password Validation - Timothy Purvis  03-Jul-08 09:18 9:18:00 PM
      Try this - sri sri  03-Jul-08 11:25 11:25:41 PM
      Password Validation - Swapnil Salunke  04-Jul-08 12:15 12:15:54 AM
          parssword vali - Umapathy Kaliaperumal  04-Jul-08 12:26 12:26:49 AM
              Its not advisable to use both validation at once - Arjun Priyananth  04-Jul-08 12:52 12:52:19 AM
      Filter - sundar k  04-Jul-08 04:21 4:21:25 AM
      Password Validation - Sanjay Verma  04-Jul-08 05:21 5:21:59 AM
View Posts

promotion
Silverlight    WPF    WCF    WWF    LINQ   
JavaScript    AJAX    ASP.NET    XAML   
C#    VB.NET    VB 6.0    GDI+    IIS    XML   
.NET Generics    Anonymous Methods    Delegate   
Visual Studio .NET    Expression Blend    Virus   
Windows Vista    Windows XP    Windows Update   
Windows 2003 Server    Windows 2008 Server   
SQL Server    Microsoft Excel    Microsoft Word   
SharePoint    BizTalk    Virtual Earth   
.NET Compact Framework    Web Service   


"Everything" RSS / ATOM Feed Parser
How to send and receive messages through message queuing in .Net
How to Read text file as database
SQL Server 2005 Paging Performance Tip
Display code of web page.
Fully Scalable Excel File Importer class for .net using Microsoft Jet driver
Generic Chart Color Manager class that can be used for any charts
Helper class to style the infragistics wingrid
Using Reflection to detemine as Assembly Info in and out.
Helper class to play with Window (Owners and position)
Resolving displayname from the culture using the XmlLanguage and LanguageSpecificStringDictionary class