Mi método de conexión contra el SQL SERVER es el siguiente
dim Con as new adodb.conecction
with con
.Provider = "SQLOLEDB"
If InStr(1, ServerName, ".") <> 0 Then
.Properties("Network Library") = "DBMSSOCN"
End If
.Properties("Data Source") = ServerName
.Properties("User Id") = UserName
.Properties("Password") = UserPWD
.CursorLocation = adUseClient
.Properties("Initial Catalog") = "SIGEC"
.Properties("Current Language") = "English"
.ConnectionTimeout = 50
.Open
end with
Ahora el tema es que, si no hay red o se cayó el servidor (la máquina, no el
SQL SERVER) este método de conexión tarda mucho tiempo. Me imagino que es el
tiempo por defecto en que tarda Windows en encontrar una máquina en la
red. pero, tiene alguna solución esto????
Muchas gracias Pablo
Leer las respuestas