在下面的代码中,我只想在第一行显示来自数据库的数据。如何显示数据?
Dim sql As String
sql = "SELECT * FROM category "
Dim adp As New OleDbDataAdapter(sql, conn)
Dim dataset As New DataSet
adp.Fill(dataset, "Table")
For Each dbrow As DataRow In dataset.Tables("Table").Rows
'subcate.Items.Add(dbrow.Item("sub_cate"))
DataGridView1.CurrentRow.Cells(0).Value = dbrow.Item("code")
Next