Re: [gnome-db] Opening lost connection



Vivien Malerba writes:

Hi!

> 
>     How can I re open lost connection with GDA3?
>     Is there specific signal I could connect to?
>     <http://mail.gnome.org/mailman/listinfo/gnome-db-list>
> 
> 
> The GdaConnection has a "conn-closed" signal which is emitted when the
> connection is closed, but the connection is consideded closed when it
> has been closed by the programmer, not because a database provider has
> detected an actual connection problem. Anyway, you can use
> gda_connection_open() to try to re-open a closed connection (if the
> connection is already opened, then nothing is done).

How about "conn-lost" signal?
I see there's specific error handling when provider's connection pointer
is lost.
At least seems so for MySQL, PostgreSQL and Sybase.

It's very fine to catch error like invalid SQL syntax, but lost
connection (even "probably lost" one)
is critical operation IMO. It should work fine for all popular DB providers.

Piotras


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]