E
Eric S. Blake
Hi:
Hope this is a simple one. Simply stated this code functions while PDA is
NOT DOCKED and connected to network via WIFI, once docked this code fails to
connect to my server.
Am I doing something wrong?? Any help of suggestions would be appreciated!
Eric.
Private Const strConnection As String = _
"Server=serveripaddr;" + _
"User ID=id;password=pw;" + _
"Persist Security Info=True;Integrated Security=false;Connect Timeout=5;" +
_
"initial catalog=myDatabase;"
Public Function Check_Connectivity(Optional ByVal strState As String =
"TEST") As Boolean
'-------------------------------------------------------------------------------------------
' Function: CheckConnectivity Mod:08/04/2005 Programmer: Eric
S. Blake
' Check Connectivity See if we have Internet Access....
'-------------------------------------------------------------------------------------------
Dim sqlConn As New SqlClient.SqlConnection
Dim strConn As String = strConnection
Dim strS As String
Check_Connectivity = False
If strConn <> "" Then
sqlConn = New SqlClient.SqlConnection
sqlConn.ConnectionString = strConn
strS = sqlConn.GetType.ToString
Check_Connectivity = True
Try
sqlConn.Open()
Catch ex As Exception
Check_Connectivity = False
End Try
If Check_Connectivity = True Then
sqlConn.Close()
End If
End If
sqlConn = Nothing
End Function
Hope this is a simple one. Simply stated this code functions while PDA is
NOT DOCKED and connected to network via WIFI, once docked this code fails to
connect to my server.
Am I doing something wrong?? Any help of suggestions would be appreciated!
Eric.
Private Const strConnection As String = _
"Server=serveripaddr;" + _
"User ID=id;password=pw;" + _
"Persist Security Info=True;Integrated Security=false;Connect Timeout=5;" +
_
"initial catalog=myDatabase;"
Public Function Check_Connectivity(Optional ByVal strState As String =
"TEST") As Boolean
'-------------------------------------------------------------------------------------------
' Function: CheckConnectivity Mod:08/04/2005 Programmer: Eric
S. Blake
' Check Connectivity See if we have Internet Access....
'-------------------------------------------------------------------------------------------
Dim sqlConn As New SqlClient.SqlConnection
Dim strConn As String = strConnection
Dim strS As String
Check_Connectivity = False
If strConn <> "" Then
sqlConn = New SqlClient.SqlConnection
sqlConn.ConnectionString = strConn
strS = sqlConn.GetType.ToString
Check_Connectivity = True
Try
sqlConn.Open()
Catch ex As Exception
Check_Connectivity = False
End Try
If Check_Connectivity = True Then
sqlConn.Close()
End If
End If
sqlConn = Nothing
End Function