我看到以下错误:
这是我的代码:
Private Sub Historydata()
If Not con.State = ConnectionState.Open Then
con.Open()
End If
Dim dataadapter As New OleDb.OleDbDataAdapter("select * from approvedmasterlist where = '" & txtid.Text & "'", con)
Dim dt As New DataTable
'fill data to datatable
dataadapter.Fill(dt)
'offer data in data table into datagridview
DataGridView1.DataSource = (dt)
'close connection
con.Close()
End Sub
任何人都可以解释错误及其发生的原因吗?