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"
精彩评论