otherside
Well-known member
Hey guys can you tell me whats wrong here ?
Im getting the error:
Object reference not set to an instance of an object
on line 8
Im getting the error:
Object reference not set to an instance of an object
on line 8
Code:
1: Dim Conn As New OleDbConnection()
2: Dim Ada As New OleDbDataAdapter()
3: Dim St As New OleDbCommand()
4: Dim DS As DataSet
5: Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\students.mdb;Persist Security Info=False"
6: Conn.Open()
7: St.CommandText = "SELECT *FROM Staff"
8: Ada.SelectCommand.Connection = Conn
9: Ada.SelectCommand = St
10: Ada.Fill(DS, "Staff")