By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,237 Members | 1,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,237 IT Pros & Developers. It's quick & easy.

Newb Query About Reconnecting aplications to DB2 Server

P: n/a

I have a running application in which I connected using EXEC SQL
CONNECT TO , all is running fine, now I want to introduce some
failsafety into this, so I want to handle a situation like:
1) Application Connects on startup
2) Runs fine for a while
3) Something causes a break in this connection(maybe someone pulled the
wrong network cable out)
4) Connection is re-established a minute later.

I want my application to reconnect, the problem, as much as I try to
re-connect, it fails. Initially, I thought this maybe because I am not
closing the client side of the connection when I detected the loss of
database connectivity, so now I am doing that too, using the CONNECT
RESET, but the connect reset fails too, complaining that there is not
database connection.

Now I am in a fix, how should I go about this? I am using C for my
application. What do I need to do to re-establish connection?

Thanks, Draw

Oct 12 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.