VB.NET 2005 & SQL Server Express problem

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
 
G

Greg Burns

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top