The problem is here:
If con.State = ConnectionState.Closed Then
con.Open()
Else
With com
...
End If
The first thing you have to do is check if the connection is closed, and it is. Then you have to open it. The
mesg
variable is never filled with data.
A simple breakpoint and debug will help you.