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