Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8436

Re: How to auto reconnect to database after network disconnect?

$
0
0

Thanks for the response Bruce!

 

I was worried that might be the problem, I am _not_ performing a SetTransObject after the reconnect.

 

Currently the DBError event is being fired off in the custom parent transaction object.

1. Im thinking I should add DBError event to my parent datawindow, so that way I have access to the datawindow object and can run the SetTransObject function. Hmm but I am not sure what will happen when I run retrieve on the next datawindow right after and so on.

 

Is there an easy way to run SetTransObject on all open DataWindows?

 

2. Another solution I tried was throwing an exception after reconnecting (with the intent of the exception bubbling up, causing current execution to break out and potentially start over the user), but I couldnt add an exception to the DBError event, I did see someone else post a way to do it, by throwing an exception catching it and throwing it again to bypass, but it didnt seem to work correctly for me.

 

======

3. The overall intent of all of this, was, when a network problem occurs, without needing a user to manually close and rerun the application, the application handles the problem and lets the user continue or starts the user from a main screen.

Is this possible? Or am I destined for a HALT CLOSE?

 

Thanks! -Stephen


Viewing all articles
Browse latest Browse all 8436

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>