Datagridview不加载表中的所有记录

时间:2015-04-21 14:13:37

标签: vb.net datagridview

你好,这对我来说仍然是恶化的。我加载了一个包含11条记录的数据库表,然后在此之后弹出datagridview并仅加载10条!怎么了?

Dim cmd As OleDbCommand = New OleDbCommand("SELECT PartNbr, Qty, Price FROM CompBOM  WHERE HeaderCounter LIKE '" & frmHeader.txtAutoNumber.Text & "' AND LabelName LIKE '" & mbLabel & "'", conn)
adapter = New OleDbDataAdapter(cmd)
builder = New OleDbCommandBuilder(adapter)
dataSet = New DataSet()
conn.Open()
adapter.Fill(dataSet, "CompBOMTable")
conn.Close()
DGView.DataSource = dataSet
DGView.DataMember = "CompBOMTable"

0 个答案:

没有答案