![]() |
| ||
| VB.Net and sql server connection I'm tyring to connect to the sql server on my lcoal machine and have this error. "An error has occured establishing connection to the server. Failure may be caused by the fact that under the default settings SQL server does nto allow remote connections.(provider:Named Pipes Provider,error 40 - could not open a connection to sql server)" Can someone help me fix this? Thanks |
| ||
| Re: VB.Net and sql server connection can you post your code |
| ||
| Re: VB.Net and sql server connection Is it SQL express or the full version? If so what version is it? |
| ||
| Re: VB.Net and sql server connection Quote:
Dim strConn As String = "Integrated Security=True;" & _ "Initial Catalog=Cargo;" & _ "Data Source=localhost" |
| ||
| Re: VB.Net and sql server connection Quote:
Thanks. |
| ||
| Re: VB.Net and sql server connection Try instead of localhost --> localhost\SQLEXPRESS |
| ||
| Re: VB.Net and sql server connection yes, try that If that doesnt work you may need to mess about with the config (sql express is set up to be secure by default, so only the local machine can connetc to it. some code doesnt like this) |
| ||
| Re: VB.Net and sql server connection do like this. connetionString = "Data Source=ServerName;Initial Catalog=DatabaseName;User ID=UserName;Password=Password" connection = New SqlConnection(connetionString) jannet. |
| ||
| Re: VB.Net and sql server connection Erm, you know this thread is like 2 years old? |
| All times are GMT -4. The time now is 3:16 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC