T
tjonsek
When executing the following code, I get this error message:
Object reference not set to an instance of an object
It bombs out on me rigth at the cmdWO.CommandText statement.
If you have any ideas, please share them!
Dim strWO As String
Dim rdrWO As System.Data.SqlClient.SqlDataReader
Me.cnnContract.Open()
cmdWO.Connection = cnnContract
cmdWO.CommandText = "Select * from ContractOutWO where ID="
& txtFind.Text
rdrWO = cmdWO.ExecuteReader
With rdrWO
While .Read
strWO = strWO & rdrWO.GetString(1) & ","
'.NextResult()
End While
End With
rdrWO.Close()
Object reference not set to an instance of an object
It bombs out on me rigth at the cmdWO.CommandText statement.
If you have any ideas, please share them!
Dim strWO As String
Dim rdrWO As System.Data.SqlClient.SqlDataReader
Me.cnnContract.Open()
cmdWO.Connection = cnnContract
cmdWO.CommandText = "Select * from ContractOutWO where ID="
& txtFind.Text
rdrWO = cmdWO.ExecuteReader
With rdrWO
While .Read
strWO = strWO & rdrWO.GetString(1) & ","
'.NextResult()
End While
End With
rdrWO.Close()