in reply to How to check the $dbh's status

Just call connect_cached every time. It will take care of reconnecting if the connection has gone bad.

Replies are listed 'Best First'.
Re^2: How to check the $dbh's status
by pysome (Scribe) on Jul 19, 2007 at 05:26 UTC
    can i use $dbh->{Active} to catch the connection status?
      Well, connect_cached does more than that. It pings the connection as well. Don't waste your time rewriting connect_cached -- just call it.
        Thank your very much,i will try it:)