Hi,
I am having problems with my Visual Studio 2005 VB.net win app connecting
to SQL Express. I have configured my SQL Express to enable remote
connections, I believe it is correct, since others in the office can connect
to it using MS SQL Server Management Studio, and I can make a successful test
ODBC connection from the client computer, using both named pipes and tcpip.
But my VB.net app can not connect on the client computer, I get error -
System.Data.SqlClient.SqlException: 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).
This app runs fine on the machine the SQL Express is running on (Windows
2000). My connection code is: Data Source=xxx\sqlexpress;Initial
Catalog=xxx;User ID=xxx;Password=xxx. I have tried putting np: and tcp: with
the port on the data source, but then the code doesn't run on the app on the
server...
Anybody know what I am doing wrong?
Thank you for any help.
Sandy
Hi,
any blocking firewall in the machine ? See if you can open up a
connction using the SQLCMD application from the command prompt.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Hi, Yes I can open a connection using SQLCMD, specifying both tcp with port,
and specifying np. The client machine doesn't have SQL installed, but the
odbc connections worked.
Sandy
"Jens" wrote:
> Hi,
> any blocking firewall in the machine ? See if you can open up a
> connction using the SQLCMD application from the command prompt.
> HTH, Jens K. Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>
No comments:
Post a Comment