i am trying to insert value using dataset but its giving me an error of null point exception(object was not created) at run time
'my code is
Dim cnCustomers As OleDbConnection
cnCustomers = New OleDbConnection
Try
With cnCustomers
' If .State = ConnectionState.Open Then .Close()
.ConnectionString = cnString
.Open()
End With
Catch ex As OleDbException
MsgBox(ex.ToString)
End Try
Dim dt As New DataTable
dt = dsstudent.Tables("survey1")
Dim dsnewRow As DataRow ---- giving error at this point
dsnewRow = dt.NewRow()
Error is :-(System.NullReferenceException)
tip is "Use the New keyword to create the instance. " at dim dt as new table
did it but not working