I am having trouble recovering from DB errors. I am opening the database with
Simple.Data.Database.Opener.OpenConnection(connectionString, "System.Data.SqlClient").I start my program when the DB server is down. I then open the connection and attempt to perform a query. I correctly receive an error
Exception Type=System.Data.SqlClient.SqlException
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I then start up the DB server and try the query again. Again, I receive the same exception. I can't seem to get rid of it, until I restart my application. I need a way to get Simple.Data to start fresh.
I have tried calling SqlConnection.ClearAllPools(), but it doesn't seem to make a difference.
I have also tried Simple.Data.Database.ClearAdapterCache(); but that also does nothing.
Can you help me get past this issue?
I am using version 0.18.3.1.
Thanks,
Regan