我正在使用以下代码。运行时,组合框显示System.Data.DataRowView而不是数据库中的项名称
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim fillcon As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\tcs.accdb")
Dim asql As String = ("SELECT ItemName FROM Items ORDER BY ItemName")
Dim da As New OleDbDataAdapter(asql, fillcon)
Dim ds As New DataSet
da.Fill(ds)
ComboBox1.ValueMember = "ItemName"
ComboBox1.DataSource = ds.Tables(0)
ComboBox1.SelectedIndex = 0
Catch ex As Exception
MsgBox("ERROR : " & ex.Message.ToString)
End Try
End Sub