Iwant to check whether the userid and passsword entered for the designation 'business manager' and for ''counter assisstant is same as that in users table . if it is correct it must show next page main menu otherwise error message. what will be the code for that in vb.net?

Do you know the SQL command to achieve the same?

If so, use a DataReader-

'We have a Data Reader to read the values returned by the SQL Command Execution  
'cmd is your SQL command
' I am using ODBC for DB Connectivity
   Dim dr As Odbc.OdbcDataReader  
   dr = cmd.ExecuteReader

 If dr.HasRows = True Then  
       'If SQL command returns rows, , then we show the next form which contains the application, in my case its   Form1  

'Remember to close the login form in the form closing event of Form1, and hide this form in load of form1

        Form1.Show()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.