By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,855 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,855 IT Pros & Developers. It's quick & easy.

Error connecting to a SQL Server 2000

P: n/a
Hi there,

I am currently developing an ASP.NET program that connects to a SQL Server
2000 database. I also have SQL Server 2005 Express installed on the same
local machine.

Prior to installing SQL Server 2005, my apps were working and is connecting
flawlessly to a database on the SQL Server 2000. Now, whenever I connect to
the same database with the 2005 version installed, I keep on getting this
error:

---------------------------------------
System.Data.SqlClient.SqlException: 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) at
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception,
Boolean breakConnection) at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj) at System.Data.SqlClient.TdsParser.Connect(Boolean&
useFailoverPartner, Boolean& failoverDemandDone, String host, String
failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64
timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) at
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) at
System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at
System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options) at
System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) at
System.Data.SqlClient.SqlConnection.Open() at
SovWebApp.Library.DataSourceAccess.GetSingleData(S tring query, Boolean
isStoredProc, DataSourceFields[] parameters) in C:\_Documents\Work
Files\Conservation\SovWebIntranetApps\SovWebLibrar y\DataSourceAccess.cs:line
72 at SovWebApp.Conservation.Logic.ConservationLogic.Get UserID(String
userName) in C:\_Documents\Work
Files\Conservation\SovWebIntranetApps\Conservation \BusinessLayer\ConservationLogic.cs:line
50 at SovWebApp.Conservation.Logic.ConservationLogic.Val idateUserID(String
userName, Int32& userID) in C:\_Documents\Work
Files\Conservation\SovWebIntranetApps\Conservation \BusinessLayer\ConservationLogic.cs:line
61 at SovWebApp.Conservation.UI.Conservation.Page_Load(O bject sender,
EventArgs e) in c:\_documents\work
files\conservation\sovwebintranetapps\conservation \conservationform.aspx.cs:line 86
-------------------------------

I have tried enabling my named pipes as well as my tcp/ip for both SQL
Servers, and I still keep on getting the same error.

I have tried checking my connection string and it seems it is correct.
<add key="DBConnection" value="Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=Conservation;Data Source=(local)"/>
My Sql Server 2005's named instance is: (local)\SQLExpress
Please help! I really don't know what to do....
Thank you so much!

Jan 3 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Ann,

Did you had a beta installed before installing SQLExpress again?

Cor
Jan 3 '06 #2

P: n/a
Hi Cor,

Thank you for your reply. Really do appreciate it.

As for your question, I had a newly formatted drive when I installed SQL
Express.

Regards,
Ann
"Cor Ligthert [MVP]" wrote:
Ann,

Did you had a beta installed before installing SQLExpress again?

Cor

Jan 3 '06 #3

P: n/a
With similar problems, it has often been resolved when I create an "alias" to
the SQL server in the SQL Client Software.

Hope this helps..

Jan 3 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.