Printing last cell value of data table on label control

  • Thread starter Thread starter AliMonMK
  • Start date Start date
A

AliMonMK

Guest
Dear Friends ...


Please see the table screen shot from my database. I need to print the last value in TID column from database table (in this example TID no is 12) in label1 by clicking button2 on vb.net salesmysql form.

so far my code here is

Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
conn.Open()
Dim ds As New DataSet
Dim da As New MySqlDataAdapter("select TID from mydatabase.tbltran;", conn)
da.Fill(ds, "mydatabase.tbltran")

End Sub

80262e658741f6c9a4175105b1fd1ad4._.jpg


e8256e7ee59cc45f5fd6ac8bb47285fe._.jpg


Continue reading...
 
Back
Top