Dim cn As New Data.Oledb.OledbConnection("连接字符串")
static pflag As String = "通"Try cn.open() cn.Close() If pflag = "不通" Then Messagebox.show("通") End If pflag = "通"Catch ex As Exception If pflag = "通" Messagebox.show("不通") End If pfalg = "不通"End Try