Error connecting to a SQL Server 2000

G

Guest

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.OnError(SqlException exception,
Boolean breakConnection) at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(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.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options) at
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) at
System.Data.SqlClient.SqlConnection.Open() at
SovWebApp.Library.DataSourceAccess.GetSingleData(String query, Boolean
isStoredProc, DataSourceFields[] parameters) in C:\_Documents\Work
Files\Conservation\SovWebIntranetApps\SovWebLibrary\DataSourceAccess.cs:line
72 at SovWebApp.Conservation.Logic.ConservationLogic.GetUserID(String
userName) in C:\_Documents\Work
Files\Conservation\SovWebIntranetApps\Conservation\BusinessLayer\ConservationLogic.cs:line
50 at SovWebApp.Conservation.Logic.ConservationLogic.ValidateUserID(String
userName, Int32& userID) in C:\_Documents\Work
Files\Conservation\SovWebIntranetApps\Conservation\BusinessLayer\ConservationLogic.cs:line
61 at SovWebApp.Conservation.UI.Conservation.Page_Load(Object 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!
 
C

Cor Ligthert [MVP]

Ann,

Did you had a beta installed before installing SQLExpress again?

Cor
 
G

Guest

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
 
G

Guest

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..
 

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