ConnectionString works for VB6/VBNET/VBNET2003 for SQL SERVER but not for VBNET2005 SQL SERVER only local
-
Hello, I have this sub: Sub ConDB() Dim oSqlCliCon As SqlConnection oSqlCliCon = New SqlConnection("Data Source=120.260.9.8;Integrated Security=SSPI;Initial Catalog=pubs") Try oSqlCliCon.Open() Catch ex As Exception msgbox(ex.Message) End Try oSqlCliCon.Close() End Sub The problem: The code works for VB6/VBNET/VBNET2003 for SQL SERVER for VBNET2005 works only local but for the SQL SERVER don't. The exception message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The exception message if modify the connectionstring: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Please help, thank you. gangeles