VB.NET 组合框显示 System.Data.DataRowView
我使用了这段代码:
myCommand = New SqlComman("SELECT RackName FROM tblRack", myConnection)
myAdapter = New SqlDataAdapter(myCommand)
myAdapter.Fill(myDataSet, "tblRack")
cboRack.DataSource = myDataSet.Tables(0)
然后在组合框中我得到了显示“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 got the display "System.Data.DataRowView". Please help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有设置数据值字段和数据文本字段。
cboRack.datavaluefield = "RackName" '您没有使用 ID 吗?
cboRack.datatextfield = "机架名称"
You didnt set the datavaluefield and datatextfield.
cboRack.datavaluefield = "RackName" 'Youre not using IDs ?
cboRack.datatextfield = "RackName"