Error conexion with vbNet 2005 but not with others
-
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
-
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
Your question doesn't make much sense. Are you trying to connect to a SQL Server 2005 database?? If so, you have to go into the SQL Server configuration manager and turn on TCP/IP connections. By default, an SQL Server 2005 installation will only accept connections from applications running on the machine the server is installed on. Dave Kreskowiak Microsoft MVP - Visual Basic
-
Your question doesn't make much sense. Are you trying to connect to a SQL Server 2005 database?? If so, you have to go into the SQL Server configuration manager and turn on TCP/IP connections. By default, an SQL Server 2005 installation will only accept connections from applications running on the machine the server is installed on. Dave Kreskowiak Microsoft MVP - Visual Basic
Dave thank you for your response, We work with VB6, VB.NET, VB.NET.2003 and the last VB.NET.2005 We try to walk with the technology. When work with VB6, VB.NET, VB.NET.2003 don't have problem, what I can say, we don't to change nothing because works fine. But, since install VB.NET.2005 and try to do an application don't can stablish a conexion to the server. So, we don't need to change the configuration but meaby vb.net.2005 requieres to change, and we don't have the config to change, I look on sql-server-tool and have de TCP/IP added (enabled), you refer to this? The NET Principal Server (have the DB) Have a Domain We attach to the domain I test on two ways from client to server and server to client to stablish conexion but don't stablish. Hope that you can help us gangeles
-
Dave thank you for your response, We work with VB6, VB.NET, VB.NET.2003 and the last VB.NET.2005 We try to walk with the technology. When work with VB6, VB.NET, VB.NET.2003 don't have problem, what I can say, we don't to change nothing because works fine. But, since install VB.NET.2005 and try to do an application don't can stablish a conexion to the server. So, we don't need to change the configuration but meaby vb.net.2005 requieres to change, and we don't have the config to change, I look on sql-server-tool and have de TCP/IP added (enabled), you refer to this? The NET Principal Server (have the DB) Have a Domain We attach to the domain I test on two ways from client to server and server to client to stablish conexion but don't stablish. Hope that you can help us gangeles
-
Dave Than you again for your response. Exactly, we now test with the 3 forms to connect: 1. Standard Security 2. Trusted Connection 3. Connect via an IP address (referer : http://www.connectionstrings.com/) So, we have 3 more servers and try to connect to them, but only one server failed to connect. I think like you is a configuration (meaby SQL server) or software to install problem, but We don't know what it´s. We can follow like first step the MDAC gangeles