I know this is strickly not a web design question, dunno where else to post...
To remotely admin and monitor some functions of the
website hosting, I wish to use a local application to connect to the MSSQL DB.
I have the following code:
Code:
Dim StrSQLUN As String = "**********"
Dim StrSQLPW As String = "**********"
Dim StrServer As String = "91.186.0.20\SQLEXPRESS"
Dim StrDB As String = "**********"
Dim strTimeOut As String = "Connection Timeout=0;"
Dim pStrSQLConn As String = "Server=" & StrServer & ";Database=" & StrDB & ";User Id=" & StrSQLUN & ";Password=" & StrSQLPW & ";" & strTimeOut
Dim sqlConn As New SqlClient.SqlConnection(pStrSQLConn)
If sqlConn.State = ConnectionState.Closed Then sqlConn.Open()
This has basically been take from the existing code on the
website hosting, but changing to the server details. I had just started dev'ing this app when the admins decided to move the eurofighter server over and it was working, but the new one doesn't. It just times out after whatever time you put in the timeout variable. 0=unlimited, and so just sits there.
Now, I am also using the MSSQL Server Management Studio local to connect to the same database, and although slow, does connect after about a minute or so. I thought they would be using the same type of underlying connection to access the server and database? Is this correct?
Does anyone have any suggestions on how to resolve this issue??
Thanks for any help
Adam.