Hai ,i am creating login page with multilevel access .This login page is connected to database and using vb.net 2005 and sql 2005, the column in table my database has username , password and department .The login works but i tried adding an acces level feature to it (Admin,Counter, Store access level , takes you to diferent pages) and then i got errors type sqlCeDataReader is not defined. Please advice my how to solve this error.This is the code use 1 login button , 2 text boxes txtusername.Text and txtpassword.Text . Below is my code and i also highlight the line which cause the error .The error is i got on that line is type expected
Public Class Login
Dim table = Me.StaffTableAdapter1
Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click
Dim nama1 As String
nama1 = Me.txtusername.Text
Dim table = Me.StaffTableAdapter1.user_pass(Me.txtusername.Text, Me.txtpassword.Text)
Dim reader As SqlClient = objComm.ExecuteReader
If reader.Read Then
elseIf reader(0) = "Admin" Then
Me.Hide()
MsgBox("You Are Login " & nama1, MsgBoxStyle.OkOnly)
databasestatus.Show()
Admin.Show()
'*************************************************************************
ElseIf reader(0) = "Store" Then
Me.Hide()
MsgBox("You Are Login " & nama1, MsgBoxStyle.OkOnly)
DatabaseStatus2.Show()
page.Show()
end if
end sub
Public Class Login
Dim table = Me.StaffTableAdapter1
Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click
Dim nama1 As String
nama1 = Me.txtusername.Text
Dim table = Me.StaffTableAdapter1.user_pass(Me.txtusername.Text, Me.txtpassword.Text)
Dim reader As SqlClient = objComm.ExecuteReader
If reader.Read Then
elseIf reader(0) = "Admin" Then
Me.Hide()
MsgBox("You Are Login " & nama1, MsgBoxStyle.OkOnly)
databasestatus.Show()
Admin.Show()
'*************************************************************************
ElseIf reader(0) = "Store" Then
Me.Hide()
MsgBox("You Are Login " & nama1, MsgBoxStyle.OkOnly)
DatabaseStatus2.Show()
page.Show()
end if
end sub