VB.NET 2005 & SQL Server Express problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I've just upgraded to VS.NET 2005 and SQL Server Express 2005.
I converted my 2003 project into 2005.
Now, when I try to run it, I get the error message:

A first chance exception of type 'System.Data.SqlClient.SqlException'
occurred in System.Data.dll
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'm not sure if this is a SQL or VB problem...this error occurs before my
code should be trying to connect...

Any idea what's going on here?
Thanks,
Amber
 
You'll get that error if your "data source" in your connection string is
wrong. I was able to duplicate it by specifying the incorrect servername for
my SQL Server.

If you just installed SQL Server Express 2005 make sure your data source is
".\SQLEXPRESS". This is assumes this is the instance you want to connect
to. What database was your old 2003 project using before installing SQL
Server Express 2005?

Greg
 
Back
Top