Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Database Programming

by de-merphq (Beadle)
on Nov 08, 2006 at 22:59 UTC ( #582990=sourcecodesection: print w/ replies, xml ) Need Help??
How to reconnect a dead DBD::Sybase Connection
on Nov 08, 2006 at 20:11 UTC
by jfroebe

It is important to know that this is just one method of reconnecting a dead connection.  Note that we are handling the errors manually for the individual query.  It wouldn't take much to create a db_exec subroutine so we just call the db_exec() subroutine and just worry about the reconnect in one place.

Notice that because of DBD::Sybase bug # 616, the error 151 will be printed to STDERR.

./test_sybase OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = ( +151) Message String: ct_cancel(): user api layer: external error: A connect +ion to the server must exist on the connection structure before this +routine can be called. ERROR: Connection to DBMS died syb_db_disconnect(): ct_close() failed MSG: Reconnected
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-10-23 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (123 votes), past polls