S
Stu
with the following code snippet
Dim ConOra As OracleConnection = New OracleConnection()
ConOra.ConnectionString = "User Id=USER;Password=PASSWORD;Data
Source=orcl9i;"
Dim Sql As String = "select * from CCO_MOTD order by ID "
Dim cmd As OracleCommand = New OracleCommand(Sql)
cmd.Connection = ConOra
cmd.CommandType = CommandType.Text
' Execute command, create OracleDataReader object
Dim reader As OracleDataReader = cmd.ExecuteReader()
While (reader.Read())
Message(reader.GetDecimal(12)) = reader.GetString(0)
MaxMessage = reader.GetDecimal(12)
Console.WriteLine("MSG: " + Message(MaxMessage))
End While
cmd.Dispose()
Everyone runs happy and fine in the development envionment. When I create
the install files, or run the .exe, it throws a 'Object reference not set to
an instance of an object' error at the While(reader.Read()). This happens
on other systems as well as my own.
An interesting note, when running the exe file on a coworkers machine, who's
setup is the same as mine (same version of .NET runtime, same version of
VS.NET and same version of Oracle) - things run just fine when running the
..exe file.
Where do I go from here, is this a known issue, help ?
Thanks much in advance...
Stu
Dim ConOra As OracleConnection = New OracleConnection()
ConOra.ConnectionString = "User Id=USER;Password=PASSWORD;Data
Source=orcl9i;"
Dim Sql As String = "select * from CCO_MOTD order by ID "
Dim cmd As OracleCommand = New OracleCommand(Sql)
cmd.Connection = ConOra
cmd.CommandType = CommandType.Text
' Execute command, create OracleDataReader object
Dim reader As OracleDataReader = cmd.ExecuteReader()
While (reader.Read())
Message(reader.GetDecimal(12)) = reader.GetString(0)
MaxMessage = reader.GetDecimal(12)
Console.WriteLine("MSG: " + Message(MaxMessage))
End While
cmd.Dispose()
Everyone runs happy and fine in the development envionment. When I create
the install files, or run the .exe, it throws a 'Object reference not set to
an instance of an object' error at the While(reader.Read()). This happens
on other systems as well as my own.
An interesting note, when running the exe file on a coworkers machine, who's
setup is the same as mine (same version of .NET runtime, same version of
VS.NET and same version of Oracle) - things run just fine when running the
..exe file.
Where do I go from here, is this a known issue, help ?
Thanks much in advance...
Stu