我希望有人能帮忙.但是每当我运行我的代码,并尝试查看一个高分,所有我收到我的列表框是System.Data.DataRowView.
谁能看到为什么?
码:
MysqLConnection myConn = new MysqLConnection(connStr); string sqlStr = "SELECT CONCAT(Name,' ',score) as NameAndscore " + "FROM highscore ORDER BY score DESC"; MysqLDataAdapter dAdapter = new MysqLDataAdapter(sqlStr,myConn); DataTable dTable = new DataTable(); dAdapter.Fill(dTable); dAdapter.Dispose(); lstNames.DisplayMember = "NameAndscore"; lstNames.DataSource = dTable;