I have a sample VB.NET App that successfully connects to my remote sql server for checking license status. My table name is
"Register"
ID ------ Name -------- CPUSerial
1 -------- john ----------BEER123456
When debugging my application, I clicked on the button and the data was correctly loaded into a DataGridView
.
However, When my Internet connection is down or when I disabled network adaptor, my application freezes and throws error 40.
I would like an example (database connection code example) that keeps silently connecting to remote server for checking specific record or use other threads that will not cause app freezing. Application must keep running whether the Internet connection is lost or not. Something like:
Timer1_Tick Event (Interval = 10000 ms)
If database connection string = unreached Then
MsgBox("Check Your Internet Connection")
and User Will Press OK Then
Application Keep Running
Else
Nothing Show Any Message
End If