I
Ian Cox
Hello.
I am using the following code to open a connection to an oracle
database.
using (OracleConnection cn = new OracleConnection())
{
cn.ConnectionString = connectionString;
cn.Open();
//call the overload that takes a connection in place of the connection
string
return ExecuteDataset(cn, commandType, commandText,
commandParameters);
}
(this code is actually from Tyler Jensen's OracleHelper class)
The code works great except it occasionally fails on the cn.Open()
line.
The error it gets is "Object reference not set to an instance of an
object". I can call the routine all day long and then it will fail and
keep failing until I restart IIS (??)
Can anybody help me get around this problem? I am about to go to
production with a system and this is really worrying.
Thanks in advance
Ian
I am using the following code to open a connection to an oracle
database.
using (OracleConnection cn = new OracleConnection())
{
cn.ConnectionString = connectionString;
cn.Open();
//call the overload that takes a connection in place of the connection
string
return ExecuteDataset(cn, commandType, commandText,
commandParameters);
}
(this code is actually from Tyler Jensen's OracleHelper class)
The code works great except it occasionally fails on the cn.Open()
line.
The error it gets is "Object reference not set to an instance of an
object". I can call the routine all day long and then it will fail and
keep failing until I restart IIS (??)
Can anybody help me get around this problem? I am about to go to
production with a system and this is really worrying.
Thanks in advance
Ian