#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2011
    Posts
    3
    Rep Power
    0

    Multiuser login page


    hai I am creating login page which have database connection.I want to modified my code here into multiuser access.For example is user are from admin department then he can access automatically into admin page after login successful
    and if the user are from Counter department then he can access automatically into department page after login successful . In my database i have column 5 column which is username, password, phone, addresss and department. I have 2 textbox which is for username and password , also button login. For software i am using Microsoft visual 2005 and database i am using sql 2005. Please advice me .....



    Public Class Form1
    Dim name = Me.StaffTableAdapter
    Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click

    Dim name = me.StaffTableAdapter.UsernamePassword(Me.txtusername.Text, Me.txtpassword.Text, Me.txtdepartment.Text)

    if name is nothing then
    Msgbox(Invalid username and password)
    else

    Admin.Show()

    end if
    end sub
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    23
    Rep Power
    0
    Originally Posted by iswan2011
    hai I am creating login page which have database connection.I want to modified my code here into multiuser access.For example is user are from admin department then he can access automatically into admin page after login successful
    and if the user are from Counter department then he can access automatically into department page after login successful . In my database i have column 5 column which is username, password, phone, addresss and department. I have 2 textbox which is for username and password , also button login. For software i am using Microsoft visual 2005 and database i am using sql 2005. Please advice me .....



    Public Class Form1
    Dim name = Me.StaffTableAdapter
    Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click

    Dim name = me.StaffTableAdapter.UsernamePassword(Me.txtusername.Text, Me.txtpassword.Text, Me.txtdepartment.Text)

    if name is nothing then
    Msgbox(Invalid username and password)
    else

    Admin.Show()

    end if
    end sub


    why not add another column/field to your data "startpage" and use it to get to the appropriate page

    bill stewart - here to talk

IMN logo majestic logo threadwatch logo seochat tools logo