Private Sub EditText1_EnterPressed'获取聊天记录
If EditText1.Text="" Then
MsgboxAsync("请先输入ID再操作","提示")
Else
CallSub(RE,"RE")
EditText2.RequestFocus
End If
End Sub
Sub RE
Dim Cursor As JdbcResultSet
Dim cxx As String =EditText1.text'ID
CustomListView1.Clear
Cursor = Starter.Mysql_Jdbc.ExecQuery2("SELECT * FROM chat WHERE `ChatID`=? ", Array As String(cxx)) '防止SQL注入
Do While Cursor.NextRow
CustomListView1.AddTextItem(Cursor.GetString("Nickname") & " " & Cursor.GetString("time") & Chr(10) & Cursor.GetString("Text"), "")
Loop
End Sub