OVH Cloud OVH Cloud

SQL client + remote connection ?

1 réponse
Avatar
\(
Bonjour

j'ai installé la dernière version du
fw 2.0 : 2.0.50215.45
et de sql express ctp 09/05 (9.00.1314)

Tout deux avec les paramètres par defaut.

Ensuite, dans une application winform, quand je me connecte avec ce code :

Dim cnx As New SQLConnexion("Data Source=192.168.0.4; Initial Catalog=test;
Integrated Security=SSPI;")

cnx.Open()
cnx.Close()


j'ai l'erreur ci-dessous.
Pourquoi ? Comment corriger ?

>>>
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)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
>>>

Merci
Marc

1 réponse

Avatar
Patrice Truong [MS]
Avez-vous essayé de mettre Data Source=<serverName>SQLEXPRESS; dans la
connection string?

--
Patrice Truong | | Microsoft Consulting
Services
[ This posting is provided "AS IS" with no warranties, and confers no
rights.]




"(" wrote in message
news:
Bonjour

j'ai installé la dernière version du
fw 2.0 : 2.0.50215.45
et de sql express ctp 09/05 (9.00.1314)

Tout deux avec les paramètres par defaut.

Ensuite, dans une application winform, quand je me connecte avec ce code :

Dim cnx As New SQLConnexion("Data Source2.168.0.4; Initial
Catalog=test;
Integrated Security=SSPI;")

cnx.Open()
cnx.Close()


j'ai l'erreur ci-dessous.
Pourquoi ? Comment corriger ?








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)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)








Merci
Marc