May 28, 2003 at 10:17 am
I have a unique situation that perhaps some of you can help me out with. I work at a riverboat casino that cruises. We currently use SQL server 7.0 on the boat for our casino software. On land, we have a restraunt point of sale. We have a SQL application that converts POS data and dumps it into our SQL 7.0 casino system.
The VB application gateway attaches to the SQL server, but when the boat disconnects from the network to go on it's morning cruise, we have to restart the application to regain functionality of the interface. Of course, being a Win2K domain, workstations and such reattach their network paths once the boat returns. however, any SQL based apps such as this gateway app must be restarted in order to continue transmitting the converted data.
So, my question is:
Is there a SQL method, piece of software, VB code, etc that will heartbeat detect a regained connection and reset the communication to the system so we do not have to restart the application?
May 29, 2003 at 2:00 pm
I have a situation where my users lose their remote connections and need to reconnect on the fly. In order to get around that, I have built functionality into my app that traps when the connection fails. Basically if a query gags due to a lost conection, I trap the error and just let the user know that the connection is not available. I also set a flag and check that flag before any of the affected queries may be run. I then give the user the ability to reconnect from a menu function in the app. So, for example, if they're editing customer information and the connection drops, their information is still on the screen, the user is informed that their connection dropped, they click the menu item to reconnect, and the result of the reconnect is displayed. As part of the updating functionality, I check the connection flag, and if the connection was broken, I reestablish the connections on my data sets before I fire an UPDATE or INSERT through them. BTW, I'm using VB6 for the app code.
I hope this helps.
May 29, 2003 at 5:19 pm
ADO connections do provide events, though rarely used. If you dim it using WithEvents instead of just dim, you'll see the options. I agree, when you get a connection broken event, you can degrade functionality in your app, start a timer to periodically try to reestablish the connection - once it succeeds, turn the features back on.
Andy
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply