Subject Re: [firebird-support] error writing data to the connection
Author Walter R. Ojeda Valiente
You can know that the connection is active sending a request to the Server, something like:


In your application, using a control Timer, you can send such command each minute or so. If there is not response then connection is dead.

For connecting again with the Server, use Classic, not SuperServer. You can download a .ZIP file from FIREBIRDSQL.ORG, there are .BAT files there that you can use for run the Server.



On Sun, Dec 20, 2015 at 4:18 AM, arash_iranbodi@... [firebird-support] <> wrote:


My application connects to a database at the start and stays connected while the application is running. The problem occurs when the connection is lost. It just stays disconnected until I restart my application.

The error message is :

Unable to complete network request to host ".......".
Error writing data to the connection.
An existing connection was forcibly closed by the remote host.

If I disconnect and connect that solves the problem as well, but how can I do that automatically? How can I detect that the connection has been lost?