Dim cn As New MySql.Data.MySqlClient.MySqlConnection("server=...; User ID=...; password=...; database=...")
cn.Open()
Dim command As New MySqlCommand("select * from ...", cn)
Dim r As MySqlDataReader = command.ExecuteReader
While r.Read
Dim sb As StringBuilder = New StringBuilder()
While r.Read()
sb.AppendLine(r("messages"))
End While
TextBox2.Text = sb.ToString
End While
This code gets all messages from the MySQL table. How can i make it to only last(not read before) messages?