我的 ojt 中有一个项目。vb2010表格。我收到此错误:
“未处理 NullReferenceException”
为什么我会得到它?
这是我的代码;
Private Sub RefreshData()
If Not con.State = ConnectionState.Open Then
con.Open()
End If
Dim da As New OleDb.OleDbDataAdapter("SELECT ID as [ID], " & _
"fname as [NAME], lname" & _
"FROM asdf ORDER by ID", con)
da.Fill(ds.Tables("asdf"))**** this part is where i get the error*****
con.Close()
End Sub