在插入记录后立即更新datagridview。
Private Sub updatedgv()
Using congv As OleDbConnection = New OleDbConnection("Provider=microsoft.jet.oledb.4.0;data source=..\library.mdb")
Dim strgv As String = "select * from NormalTransaction where RegNo='" & txt_RegisterNo.Text & "'"
Dim cmdgv As OleDbCommand = New OleDbCommand(strgv, congv)
Dim sdagv As OleDbDataAdapter = New OleDbDataAdapter(cmdgv)
Dim dsgv As DataSet = New DataSet("gvSet")
sdagv.Fill(dsgv)
DataGridView1.DataSource = dsgv
DataGridView1.DataMember = dsgv.Tables(0).TableName
End Using
End Sub
请帮我解决这个问题。