Return Value
true, if the connection is valid; otherwise, false.
If the application has an open connection for a long time, it is recommended to check whether the connection is still valid, before using it. Call of Ping method has single round trip on Oracle server.
It is not a good idea to keep a connection open for long time. Connection pool automatically pings all connections within, thus closing old connections and opening new ones is encouraged.
If the connection being pinged is not initialized or has the state other than ConnectionState.Open, the method throws an exception.