Microsoft
Software
Hardware
Network
Question : how can i overcome the problem while connecting to sql server 2005?
i am trying to connect with my sql server 2005 from a remote machine in our LAN. I am facing with the following error.
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)
i have tried all discussion in EE, but were not success.
i have enabled remote connection, NP, firewall exception.
and this is my string to which i am connection from a remote machine to the server.
Code Snippet:
1:
Public cn As New SqlConnection("Server =servername; Database = mydb; Integrated Security = True")
Open in New Window
Select All
Answer : how can i overcome the problem while connecting to sql server 2005?
why you want to use windows authentication?
if you work from remote machine it's better to use sql authentication
in this manner:
you must create a sql user in sql server management studio
and then set permission to this user to mydb database
then connect from remote machine with this user and password in your connection string
Random Solutions
Silverlight UserControl with child UserControls
Skype - creating single click dial to telephone numbers in Access 2003 database
Missing CALS in SBS 2003 after reboot.
How do I run a script to move contents of a file to a different location
CMonthCalCtrl.GetCurSel() returns date 2 years off
cannot run (without crashing) an originally 32-bit application in 64-bit environment
How do I write an SQL UPDATE statement on a price value?
Hide column in CListCtrl
ActiveSync will not provision devices, even when it is configured to allow non provisonable devices
Setfocus in a function