A service is starting and wants to access to the DB. The client running the server has currently no network acces (DB server is on a separate machine). The service tries to reconnect again in certain intervals and is able to reach the DB when netwerk connectivity is available.
Problem:
My service starts and has no network connectivity. A try to access the DB fails -> OK
Network connectivity is available again. A try to access the DB still fails -> Not OK
Here a small code sample to reproduce the problem. I compared it with the behaviour of the access to a SQL Server. The SQL server dataContext is able to connect to the DB when the network connecton is available again, dotConnect for Oracle not.
Code: Select all
try
{
using (SQL_Server_Entities context = new SQL_Server_Entities())
{
var test = (from p in context.Object1 select p).ToList();
Debug.WriteLine("Succesful check: SQL");
}
}
catch (Exception ex)
{
Debug.WriteLine("Check failed: SQL");
}
try
{
using (Oracle_Entities context = new Oracle_Entities())
{
var test = (from p in context.Object2 select p).ToList();
Debug.WriteLine("Succesful check: Devart Oracle");
}
}
catch (Exception ex)
{
Debug.WriteLine("Check failed: Devart Oracle");
}
That does not work when the first DB success is not successful.
Hope you can help me
Best Regards, Rolf