I am using castle activerecord to persist my domain objects to a sql server database. If for whatever reason the database connection fails i need to be able to ignore it and carry on with the opperation of the program.
Asked
Active
Viewed 80 times
0
-
1wouldn't it be more sensible to fix whatever is causing the connection failure? – Mauricio Scheffer Jan 20 '11 at 13:53
1 Answers
0
You can't ignore connection errors. It's up to you to decide what to do in case of a connection failure. For example, if you query for some User entities and there's a connection error, what should NHibernate/ActiveRecord return? It can't possibly make up results.
If you're working with an occasionally connected scenario, see this question.

Community
- 1
- 1

Mauricio Scheffer
- 98,863
- 23
- 192
- 275