connection

  • Thread starter Thread starter Fei
  • Start date Start date
F

Fei

Hi,

I have a question about connection. I want to trap when the internet
connection is down. For example, I fill in a Invoice row and lock it up. Now
somehow, the client has a internect connection failure so that it loose
connection to SQL server. How can I trap this in my application? I try to
use withenvents for connection. There are only two events:StateChange and
InfoMessage. However both are never fired up when the connection is down.
Please help me out.

Thanks !

Fei
 
Use TRY....CATCH...END TRY when opening connections to SQL Server or anytime you issue commands.
 
Unplug the network cable and see what happens.

There is no way to detect a dropped Internet connection until you try to use
it. As long as the port is idle, there is no way to know if anything went
wrong.
 
Back
Top