Re: Local connection to SQL Server 2005 Express fails
- From: "TAC" <tac@xxxxxxxxxxx>
- Date: Thu, 30 Nov 2006 16:51:02 -0500
Thanks for the suggestion, but using only one or the other didn't work,
either.
"Arnie Rowland" <arnie@xxxxxxxx> wrote in message
news:OD744%23LFHHA.1912@xxxxxxxxxxxxxxxxxxxxxxx
This is a WAG:
You only need one of these two settings, perhaps having both is causing
the connection string to cause failure.
Integrated Security=true;Trusted_Connection=true;
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to
the top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@xxxxxxxxxxx> wrote in message
news:ONCdne2ocahst_LYnZ2dnUVZ_u6dnZ2d@xxxxxxxxxxxxxxx
Thanks for the info, but I did everything suggested in those two articles
and I still get the same connection error. I also tried various
alterations of my connection string with no success. Further research
indicates that this is a common problem, so I wonder why Microsoft ships
the Express edition along with Visual Studio 2005, but makes it so
difficult to connect.
If you or anyone else has any other ideas, I would be most grateful.
Thanks.
"Arnie Rowland" <arnie@xxxxxxxx> wrote in message
news:OOy2vm$EHHA.1784@xxxxxxxxxxxxxxxxxxxxxxx
Perhaps these will help:
Configuration -Configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
Configuration -Connect to SQL Express from "downlevel clients"
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to
the top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@xxxxxxxxxxx> wrote in message
news:GsCdnUMH0OMdb_DYnZ2dnUVZ_qOdnZ2d@xxxxxxxxxxxxxxx
I just installed SQL Server 2005 Express edition, and created an app in
Visual Studio using C#. I get the following error when trying to
connect:
"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 enabled Named Pipes but left TCP/IP disabled because this is a
localhost connection on the same computer.
Here is the portion of the code I am using to connect:
string dbCString = "Persist Security Info=False;Integrated
Security=true;Trusted_Connection=true;Initial
Catalog=MxData;server=(local)";
SqlConnection ThisConnection = new SqlConnection(dbCString);
ThisConnection.Open();
Thanks in advance for any help.
.
- Follow-Ups:
- References:
- Local connection to SQL Server 2005 Express fails
- From: TAC
- Re: Local connection to SQL Server 2005 Express fails
- From: Arnie Rowland
- Re: Local connection to SQL Server 2005 Express fails
- From: TAC
- Re: Local connection to SQL Server 2005 Express fails
- From: Arnie Rowland
- Local connection to SQL Server 2005 Express fails
- Prev by Date: Re: Local connection to SQL Server 2005 Express fails
- Next by Date: Re: Local connection to SQL Server 2005 Express fails
- Previous by thread: Re: Local connection to SQL Server 2005 Express fails
- Next by thread: Re: Local connection to SQL Server 2005 Express fails
- Index(es):
Relevant Pages
|
Loading