VB 2010 Express Ed Sql error
hi guys, trying to get my hands wet on vs 2010 and i downloaded samples from ms site but when i tried to run some of the DB samples i received this sql error:
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)
any ideas how to get around on this? Thanks.
Re: VB 2010 Express Ed Sql error
Have you installed SQL Server Express? You can't connect to it if you haven't installed it.
Re: VB 2010 Express Ed Sql error
What is the connection string that you used?
Re: VB 2010 Express Ed Sql error
Quote:
Originally Posted by
jmcilhinney
Have you installed SQL Server Express? You can't connect to it if you haven't installed it.
Yes, it's installed.
Re: VB 2010 Express Ed Sql error
Quote:
Originally Posted by
GaryMazzone
What is the connection string that you used?
Protected Const SqlConnectionString As String = _
"Server=(local);" & _
"DataBase=;" & _
"Integrated Security=SSPI"
Please help.. Thanks :)
Re: VB 2010 Express Ed Sql error
You are trying to connect to a default instance. Did you install SQL Server Express as a default instance? Unless you changed that setting specifically, SQL Server Express would have installed as a named instance with the name "SQLExpress".
http://www.connectionstrings.com/sql-server-2005