开发者

VB.NET combobox displays System.Data.DataRowView

I used this code:

 myCommand = New SqlComman("SELECT RackName FROM tblRack", myConnection)
 myAdapter = New SqlDataAdapter(myCommand)
 myAdapter.Fill(myDataSet, "tblRack")
 cboRack.DataSource = myDataSet.Tables(0)

then in the combobox i go开发者_JS百科t the display "System.Data.DataRowView". Please help


You didnt set the datavaluefield and datatextfield.

cboRack.datavaluefield = "RackName" 'Youre not using IDs ? cboRack.datatextfield = "RackName"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜