From: Tedd <te...@al...> - 2002-11-27 00:39:11
|
I am writing a windows service that is basically polling a firebird database. In the past I have had some difficulty with the database periodically crashing. So, I am trying to make my service gracefully handle a database crash. The service itself reuses a series of FbCommand objects each time a Timer event fires. But, I haven't found a way to recover the FbCommand objects that have active transactions to allow them to be used with the new database connection. As far as I can tell, any attempt to associate a new FbConnection object with the FbCommand objects causes a rollback on the existing transaction. This obviously fails since the original connection is no longer valid. Is there a way to recover these command objects or should I instantiate new ones and let the old ones be garbage collected? Has anyone started working on enabling events? I know that my service would be a whole lot more efficient if I could use an event model as apposed to polling the database. If anybody is working on it, I'd be glad to help. If not, I'll look into it myself. Thanks for your help. Tedd --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.417 / Virus Database: 233 - Release Date: 11/8/2002 |