Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2015-07-03 16:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (54 votes), past polls