hello guys.. can u help me in my code that if i change the value of empno all the corresponding data in the empno the empname, empaddress and so on will also change because i can't figure out that when i change the value it will also change all the data in the textbox...this code it only display the first data in the database whether i change the value of the empno the data in empname, empaddress.... still the same:)
myData = myCommand.ExecuteReader()
Try
While myData.Read
Try
If (empname.Text = "") Then
Me.empno.Text = myData.Item("empno")
Me.empname.Text = Trim(myData!empname)
Me.empaddress.Text = Trim(myData!empaddress)
'Me.TextBox2.Text = myData.Item("gender")
Me.TextBox3.Text = myData.Item("Datebirth")
Me.TextBox4.Text = myData.Item("empage")
Me.TextBox5.Text = myData.Item("telnumber")
End If
'Me.ComboBox1.Items.Add(myData.Item("empname"))
Catch ex As Exception
MsgBox("!ERROR!")
End Try
End While
Catch ex As Common.DbException
MsgBox(ex.ToString)
End Try