Newbie -> System.NullReferenceException
When running below codes, I met the following error message
An unhandled exception of type 'System.NullReferenceException' occurred in NetAdmin.exe
Additional information: Object reference not set to an instance of an object.
Private Sub LoadRemoteHost()
Dim SQLDA1 As New SqlClient.SqlDataAdapter
Dim dataset As New DataSet
'
SQLDA1.SelectCommand.Connection = SQLConn0
SQLDA1.SelectCommand.CommandType = CommandType.StoredProcedure
SQLDA1.SelectCommand.CommandText = "usp_showremotehost"
dataset.Clear()
SQLDA1.Fill(dataset)
Me.C1TrueDBGrid1.DataSource = dataset.Tables("RemoteHost")
End Sub
Am I missing something? .. please advise ..many thanks in advance
Regards
Winan