I got the System.Data.DataRowView when I tried to select the data from sql database. These are my code:
......
myCommand = New SqlCommand("SELECT FirstName +' '+ LastName FROM tblVisitor", myConnection)
myAdapter = New SqlDataAdapter(myCommand)
myAdapter.Fill(myDataSet, "tblVisitor")
cboName.DataSource = myDataSet.Tables(0)
cboName.DisplayMember = "FirstName"
cboName.DisplayMember = "LastName"
cboName.ValueMember = "FirstName"
cboName.ValueMember = "LastName"
..............
and I got the above error. Please help.
Your SelectCommand does neither return a column
LastNamenorFirstName. You are only returning one column(a concatenation of both columns).So this should work: