Jump to content

MS Access connection problem with VB.NET

- - - - -

  • Please log in to reply
No replies to this topic

#1
bradploz

bradploz

    Newbie

  • Members
  • Pip
  • 6 posts
hello, I am trying to connect MS ACCESS 2007 Database with textboxes which will show the info of the users..for example..when I login..I see my info in the textboxes..and when other user logs in..they can see their info..

This is the code I have on load after the window login..

Private Sub frmemp_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Timer1.Start()

        Try

            conn.Open()

            cmd = New OleDbCommand("SELECT * FROM employees,username WHERE ID=IDE", conn)

            dr = cmd.ExecuteReader

            While dr.Read()

                txtfn.Text = dr(1)

                txtpro.Text = dr(2)

                txtsa.Text = dr(3)

            End While

        Catch

        End Try

        dr.Close()

        conn.Close()


    End Sub

But this code only shows the last user on the row on the database..It is not changing even other users login..for example...I login and I am the last user on the row..I can see my info but when other user logs in..He just see my info..Not his...

Please help..and thanks in advance..




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users