我无法弄清楚为什么这行不会在DataGrid中返回任何内容,而当我使用一个SQL查询(不是双重SELECT)时,它可以正常工作:
Dim DataAdapterInb As New MySqlDataAdapter("SELECT * FROM (SELECT * From inbox WHERE receiverid='" & ID & "') LIMIT 0,5;", MySqlConnection)
答案 0 :(得分:2)
请查看更新的答案。
Dim DataAdapterInb As New MySqlDataAdapter
("SELECT t.* FROM
//^Changed
(SELECT * From inbox WHERE receiverid='" & ID & "')t
LIMIT 0,5;", MySqlConnection) //^Changed