lorena
Well-known member
All I want to do is put data into a grid. Here is my code:
I keep getting "Object reference not set to an instance of an object"
Any help would be appreciated.
Code:
Sub BindData()
Dim strConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\intranet\databases\open_en.mdb"
Dim objConn As New OleDb.OleDbConnection(strConnString)
Dim strSQL As String = "SELECT * FROM InsChange"
Dim objCommand As New OleDb.OleDbCommand(strSQL, objConn)
Dim objDA As New OleDb.OleDbDataAdapter
objDA.SelectCommand = objCommand
Dim objDS As New DataSet
objDA.Fill(objDS)
objConn.Close()
grdRecs.DataSource = objDS
grdRecs.DataBind()
End Sub
Any help would be appreciated.