|
-
Sep 15th, 2009, 04:30 PM
#1
Thread Starter
Junior Member
problem with connection strings
Hi
I'm having problems with connection strings.
I'm running a copy of vb express 2008 on my local. I also have installed a copy of sql on my local pc ( the sql version that comes with vb express 2008).
I have written the following lines of code
Imports System.Data
Imports System.Data.SqlClient
Dim nwindConn As SqlConnection = New SqlConnection("Data Source=localhost;Integrated Security=SSPI;" & _
"Initial Catalog=northwnd")
nwindConn.Open()
the code compiles o.k but when i run it I get the error message :
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Does anyone know what causing the error?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|