VB.NET: Checking the status for connection

toytoy

Well-known member
Joined
Jul 16, 2004
Messages
46
Programming Experience
1-3
Say i make a connection to the server...

however, the other side of the server somehow disconnect form my client side..

How do i check if the connection is still on or off..

Thanks
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
if MyConnection = ConnectionState.Closed then
MyConnection=ConnectionState.Open
End If

or something like that.
 
Top Bottom