Re: Local connection to SQL Server 2005 Express fails



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.

















.



Relevant Pages

  • Re: Local connection to SQL Server 2005 Express fails
    ... Most good judgment comes from experience. ... H. Norman Schwarzkopf ... articles and I still get the same connection error. ... When connecting to SQL Server 2005, this failure may be caused by the ...
    (microsoft.public.sqlserver.connect)
  • Re: Error "SQL Server does not allow remote connections"
    ... The application could not connect to the sql server db. ... network is blocking the connection. ... SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 ... integratedSecurity, SqlConnection owningObject) +737554 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Connection from remote computer to network SQL Server
    ... There is no firewall on the W2K machine acting as the SQL server. ... I tried making the SQL machine a "trusted" on the router. ... connection works. ... To find the IP address of your computer inside the network, ...
    (microsoft.public.access.adp.sqlserver)
  • ADO.net Orcas Samples Install Problem
    ... An error has occurred while establishing a connection to the server. ... When connecting to SQL Server 2005, this failure may be caused by the ... SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, ... or am I better off with a full SQL Server install. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: OpenDataSource SQL Server xpress problem
    ... I tried your suggestions with some success. ... I tried setting up the .odc file through the Word Mail Merge wizard as ... If I work through the dialog to connect and then click the 'Test Connection' ... but I suspect it's because until recently most SQL Server ...
    (microsoft.public.word.mailmerge.fields)

Loading