SQL Server 2005 error when trying to connect to sql server 2000 database

Hi all.

I am working on asp.net 2.0 with back end as sqlserver 2000. but when trying to connect to the database i am getting the following error displayed

 

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)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: 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)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): 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)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +115
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +346
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) +1093
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +1083
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +272
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +351
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +82
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +558
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +126
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +651
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +160
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +122
System.Data.SqlClient.SqlConnection.Open() +229
System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +114
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +225
System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1105
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +157
System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +68
System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +100
System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) +100
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +113
System.Web.UI.WebControls.Login.AttemptLogin() +178
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +134
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +107
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +178
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +72
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3837


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

can anyone help???????????

 

regards

pravallika 

0
Pravallikakiran
4/3/2007 11:32:30 AM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

12 Replies
980 Views

Similar Articles

[PageSpeed] 27

Check the provider - you probably need to use "Microsoft OLE DB Provider for SQL Server" as the default is the provider for SQL2005 (SQL Native client?).
Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
4/3/2007 11:42:19 AM
Error itself say what is the problem. You need to allow SQL server to accept remote connection
Everything is possible!
0
atsofttech
4/3/2007 11:42:47 AM
i have same problem any know the answer 

Nothing is really over,untill the moment stop trying for it...
Amitsp(MCTS,MCP)
sqlreporting.blogspot.com
0
prajapatiamit2003
4/3/2007 12:41:39 PM
Have you done setting in SQL 2005 to allow remote connection?
Everything is possible!
0
atsofttech
4/3/2007 12:58:49 PM
As the backend database is SQ:2000 not SQL2005, the hint from the error message is mis-leading!

Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
4/3/2007 5:27:51 PM
0
atsofttech
4/4/2007 8:35:48 AM
Could you please give connection string?
Everything is possible!
0
atsofttech
4/4/2007 10:43:25 AM
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;


namespace timepass
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            
            // Target database, empty, with one table
 

            System.Data.DataSet dsTarget = new DataSet();
            System.Data.DataTable dtTarget = new DataTable();

            SqlConnection lodcConn1 = new SqlConnection();
            SqlConnection lodcConn2 = new SqlConnection();

            lodcConn1.ConnectionString = String.Format("Data Source=.;Initial Catalog= TEMP_KAMal;Integrated Security=True");
            lodcConn2.ConnectionString = String.Format("Data Source=pc2;Initial Catalog= AAMIT;Integrated Security=True");

            

            SqlDataAdapter lodaSource = new SqlDataAdapter(@"Select ItemDetailId,ItemUsrCode from tbl_Inventory", lodcConn1);
            DataSet ds;

            lodcConn1.Open();
            lodcConn2.Open();


            try
            {

                string dadel = "delete from tbl_inventory";
                SqlCommand cmddel = new SqlCommand (dadel,lodcConn2 );
                cmddel.ExecuteNonQuery();


                SqlDataAdapter da = new SqlDataAdapter("select * from tbl_Inventory", lodcConn1);
               DataSet ds1 = new DataSet();
                da.Fill(ds1,"temp");
               int i=0;
               foreach (DataRow dr in ds1.Tables["temp"].Rows)
               {
                   string str = "insert into tbl_Inventory values(" + dr.Table.Rows[i].ItemArray[0] + " , " + dr.Table.Rows[i].ItemArray[1] + ")";
                   SqlCommand cmd = new SqlCommand(str, lodcConn2);
                   cmd.ExecuteNonQuery();
                            
                   i++;

               }

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
            finally
            {
                // wrong
                lodcConn1.Close();
                lodcConn2.Close();

                lodcConn1.Dispose();
                lodcConn2.Dispose();

                lodaSource.Dispose();
                //lodaTarget.Dispose();

            }
        }
        }
    }



Nothing is really over,untill the moment stop trying for it...
Amitsp(MCTS,MCP)
sqlreporting.blogspot.com
0
prajapatiamit2003
4/4/2007 12:32:21 PM

prajapatiamit2003:

            lodcConn1.ConnectionString = String.Format("Data Source=.;Initial Catalog= TEMP_KAMal;Integrated Security=True");
            lodcConn2.ConnectionString = String.Format("Data Source=pc2;Initial Catalog= AAMIT;Integrated Security=True");

 Why used two connection string?

in Data source try Servername\nstance name.

In you case server name is pc2. I am not sure what is your instance name.

If you instance name is SQL2000 the your connection string would be

lodcConn2.ConnectionString = String.Format("Data Source=pc2\SQL2000;Initial Catalog= AAMIT;Integrated Security=True");


Everything is possible!
0
atsofttech
4/4/2007 12:59:49 PM

how can i enable my remote connection in sql-server 2000

 


Nothing is really over,untill the moment stop trying for it...
Amitsp(MCTS,MCP)
sqlreporting.blogspot.com
0
prajapatiamit2003
4/5/2007 6:32:17 AM

I hope this will help you

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=802150&SiteID=1


Everything is possible!
0
atsofttech
4/5/2007 6:41:15 AM

dear

i was see this link but there is nothing related to sql-server 2000 remote connection

u have other soluction plz tell me

i wait for u r replay 

 


Nothing is really over,untill the moment stop trying for it...
Amitsp(MCTS,MCP)
sqlreporting.blogspot.com
0
prajapatiamit2003
4/5/2007 10:34:36 AM
Reply:

Similar Artilces:

This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers
When I connect SQL Server 2005 to a remote database i get the error: "This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers". Can I confirm it is because: the remote db is of SQL Server 2008? There is a soln mentioned in http://forums.asp.net/t/1324047.aspx Did anybody try this (installing 2008 express: http://www.microsoft.com/express/sql/download/)? I am just checking again, whether it will disturb my existing SQL Server installation, in any means...? Though it is mentioned that it will g...

Error : 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
Hi All, i am using tha conncetion string in web.config. <add name="MyLocalSqlConnection" connectionString="Data Source=.\SqlExpress;AttachDbFilename=|DataDirectory|\SqlServer\OC00003SQL.mdf;User Instance=false" providerName="System.Data.SqlClient"/>  Instance=false and true both i have used  but i am getting error like that. on my web hosting site  Error : 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 Serv...

moving an sql server 2005 database to a sql server 2000 database
I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database. I'm not sure the best way to do this....... Can anyone enlighten me?.....   this article explains it. http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1149585_tax301536,00.html hth,mcm pizzamaker74: I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database. I'm not sure the best way to do this....... Can anyone enlighten me?..... If both are in the same network or box just register the 2005 with the 2000 cr...

SQL Server 2005 Installation problems with SQL Server Express & SQL Server 2000
Hi Guys, I have had SQL Server Express and Sql Server Management Studio Express installed on my machine for some time and recently tried to install a trial of SQL Server 2005 as well.  (Yes, I'm migrating from Visual Studio Express to Visual Studio Professional, just as in tended!) Everything went fine except that nothing seemed to be installed.  I searched in all the obvious places - both on the Start/Programs menu and on the hard-drive: nothing. A check under Add/Remove Programs showed that Sql Server 2005 Express was installed, but called SQL Server 2005. So after a number o...

Connecting to SQL Server 2000 with SQL Server 2005
I currently have Enterprise 2000 installed but would like to uninstall and install SQL Server 2005. Are there any problems if I try to reconnect to other SQL 2000 servers or other serious issues I need to consider before doing this change ?   Thanks,...

SQL Server 2000 and SQL Server 2005 in the same server
Can enyone please send me a link to a white paper explaining how to run both SQL Server 2000 and 2005 in the same machine?Thanks. I don't know about the white paper but I had both running on my machine for a while by making the SQL 2000 a named instance. So for SQL 2005 connection strings my server name was (local) while for SQL 200 using the named instance it was (local)\joesql where joesql was the instance nameHope it helps,Joe http://www.joeaudette.comhttp://www.mojoportal.com...

Error while establishing a connection to the SQL server 2005
Hi, I had an old web application created during asp.net 1.1 and it have a connection problem with the sql server 2005 when it is mirgrated to a new webserver with dotnet framework 2.0 platform. I have enabled the remote access(TCP/IP and named pipes) in sql server 2005, did all the neccessary things, check whether the TCP/IP is enabled, named pipe is enabled...  I created another web application using VS 2005. The database connection works perfectly well.This are the connectionString from the old web application.<appSettings>    <add key="ConnectionString" value=...

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 all
When i enter log in, I get the following error page.    Server Error in '/' Application. 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the err...

Connecting to sql server 2000 on Godaddy error: (provider: Named Pipes Provider, error: 40
Facts:1. I am using my account on Godaddy trying to connect to my sql server db.2. I can get into my db using user id and password.3. Godaddy's help file shows this for a connection string: connectstr = "Driver={SQL Server};SERVER=" & db_server & ";DATABASE=" &db_name & ";UID=" & db_username & ";PWD=" & db_userpassword4. My connection string: "Server=whsql-v09.prod.mesa1.secureserver.net;uid=dbasolutions;pwd=***;database=DB_87972;"  & _                    "Trusted_Connecti...

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 all #4
Hi,I have SQL Server Express Edition. I tried working out some ASP.NET Labs in my local system. Here is the link of the Virtual Lab which I tried. http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032286906&EventCategory=3&culture=en-US&CountryCode=USI recieve this error in my local system. 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 - Cou...

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 all #6
hi there! I've uploaded my website at online server. which has its database on its local server. Now whenever Im trying to open the website. I get the following message instead of website. "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) " Im using sql server 2000 for database. Asp.net 2.0 Please hel...

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 allo
My site works fine in VWD2008 express, but I get this error when I try to use it on my live website. 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.  According to this article: http://support.microsoft.com/kb/914277  I am supposed to: 1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration. Ok, th...

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 all #5
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)   <sessionState mode="SQLServer"sqlConnectionString="data source=LHX00CNU7401SQG\Session; integrated security=true"/>   I have done all the settings: --> enabling the protocols --> Starting teh SQlbrowser but still no luck. Pleas...

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 all #3
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, Hi  I think you are trying to connect with remote server using windows authentication mode.Sql won't allow this ,so try to connect with server using sql authentication mode with(username and password)Happy ProgrammingShashi.  Check if this thread on the same discussion can help.http://forums.asp.net/p/1193329/2062685.aspx...

Web resources about - SQL Server 2005 error when trying to connect to sql server 2000 database - asp.net.sql-datasource

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Social Side of Code, Database CI and REST API Testing in Methods & Tools Winter 2015 issue
... for software developers, testers and project managers – has published its Winter 2015 issue that discusses the social side of code, database ...

Dodgy database exposes details of 191 million US voters
... years, there's a high chance that your personal details are now out in the wild. Security researcher Chris Vickery found a misconfigured database ...

Huge database of 191 million U.S. voters found on the open Internet
... such bulk information online, a recent discovery seems to indicate. According to VentureBeat , a security researcher found the exposed database ...

IDG Contributor Network: Shrinking an already ginormous SharePoint database transaction log
Last month, I wrote about how to avoid having ginormous transaction logs within SharePoint databases. But what if it’s too late, and your files ...

Massive Voter Database Left Open For Public Consumption
Gosh, we could have avoided all the angst about the Clinton/Sanders voter database breach if only we'd known about this major database , accessible ...

Database configuration issues expose 191 million voter records
A misconfigured database has led to the disclosure of 191 million voter records. The database, discovered by researcher Chris Vickery, doesn't ...

Botched database leaks records for 191 million voters
... sometime this century? If so, your personal info may be out in the open. Researcher Chris Vickery has discovered that a badly configured database ...

191 Million US Voter Registration Records Leaked In Mystery Database
A huge database of 191 million US citizens is uncovered. But no one knows who carelessly left it open, whilst the FBI have been contacted.

Resources last updated: 1/15/2016 3:14:02 AM