Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 86,399 VB.NET Programmers. There are 1,482 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a VB.NET Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

login verification

 
Reply to this topicStart new topic

login verification

bliss
post 6 May, 2008 - 11:24 PM
Post #1


New D.I.C Head

*
Joined: 6 May, 2008
Posts: 3



Hi all, here is my problem. I wish to do a verification to the login form, so that the userId is match with the password at the database then the user is able to login. i wish to have a nested if statement but somehow the systems return me an error of 1: expression expected, 2. end of statement expected.

i not sure that i have point the query to the database that i had made not. Here is one of the code i had try. If for the vb 6 it may need to declare some ADO database connect, but i not sure that in vb.net is need to do that so or what.
CODE

Dim query2 As String
    Dim query As String


    Private Sub Login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Login.Click


        Dim userId As String
        Dim pass As String

        userId = Me.txtloginId.Text
        pass = Me.txtpassword.Text

        If query = "SELECT * FROM user WHERE userId = '" & userId & " '" and


            query = "SELECT * FROM user WHERE password = '" & pass & "'" Then




            main.Show()
        Else : MessageBox.Show("Wrong User ID")


        End If


I'm current developing a system like cashier, once the stock code had choosen it automaticall wiil show the price for the item, what code/function should i refer to??

thanks !
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


jayman9
post 7 May, 2008 - 09:03 AM
Post #2


Student of Life

Group Icon
Joined: 26 Dec, 2005
Posts: 5,566

We have a few tutorial on this very subject depending on which database you are using.

OldDb Basics
Sql Basics

Give those a good read and if you still have questions feel free to post them here.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 5/17/08 06:18AM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month