Iterate through oraclehomes.
Posted: Fri 15 Jan 2010 08:36
Hi
Im trying to get all avaiable Oracle homes on the computer. I use the following code:
I am getting the following exception in the console.writeline:
If I'm using the immediate window to get the name, it is working perfectly
If I'm using the name to get the OracleHome class it is also working as it should.
The only problem seems to be when trying to iterate trough the homes.
Can anyone help me solve this issue ?
Thanks !
/Klaus
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