From: Tedd <te...@al...> - 2002-12-03 13:37:40
|
Carlos, This change has fixed certain instances of the problem but it appears that there are cases where this still won't work. There are two different things that go wrong. My only guess is that it depends on what stage a transaction was in and whether the statements tied to the transaction were currently running. I will respond again with specific line numbers and error messages where the problem appears. I will also try to pin down exactly what state the commands and transactions are in when the database connection is lost. When I asked about events I was referring to implementing the isc_que_events and isc_wait_event api functions. Tedd -----Original Message----- From: fir...@li... [mailto:fir...@li...]On Behalf Of Carlos Guzma'n A'lvarez Sent: Wednesday, November 27, 2002 2:20 AM To: fir...@li... Subject: Re: [Firebird-net-provider] How to reset transaction after connection drop? Hello: > 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? Can you try with latest cvs sources i have commited a fix for it yet. > 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. No, to which events are you referring??, (now there are events enabled on FbConnection class for StateChange of connection and info messages sent by firebird server, and there are events on FbDataAdapter for data updating). Best regards Carlos Guzma'n A'lvarez Vigo-Spain --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.423 / Virus Database: 238 - Release Date: 11/25/2002 |