Im trying to get all avaiable Oracle homes on the computer. I use the following code:
Code: Select all
For i As Integer = 0 To OracleConnection.Homes.Count - 1
Console.WriteLine(OracleConnection.Homes.Item(i).Name.ToString)
Next
- System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
If I'm using the immediate window to get the name, it is working perfectly
Code: Select all
?OracleConnection.Homes.Item(0).Name
"Ora9"
Code: Select all
Dim H As String = OracleConnection.Homes.Item("Ora9").Name.ToString
Can anyone help me solve this issue ?
Thanks !
/Klaus