简体   繁体   中英

Double SQL Query in vb.net MySQLDataAdapter

我无法弄清楚为什么这一行在DataGrid中不返回任何内容,而当我使用一个SQL查询(不是double SELECT)时,它运行良好:

Dim DataAdapterInb As New MySqlDataAdapter("SELECT * FROM (SELECT * From inbox WHERE receiverid='" & ID & "') LIMIT 0,5;", MySqlConnection)

Please check the Updated Answer.

Dim DataAdapterInb As New MySqlDataAdapter
("SELECT t.* FROM 
       //^Changed
(SELECT * From inbox WHERE receiverid='" & ID & "')t
LIMIT 0,5;", MySqlConnection)                    //^Changed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM