ASP.NET C# web application to connect to SQL SERVER 2000 database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jojo41300000
    New Member
    • Apr 2007
    • 32

    ASP.NET C# web application to connect to SQL SERVER 2000 database

    Hi,

    I have a problem with database connection to SQL server 2000 from ASP.NET. When I try to connect, it give me the errors.
    But, When I try to connect to SQL SERVER 2005. It works fine.

    Any ideas what the problems might be?

    Thanks.
    Jason.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Your connection string?
    All connection strings in one place. Find the syntax for your database connection using ADO.NET, ADO, ODBC, OLEDB, C#, VB, VB.NET, ASP.NET and more.


    Or maybe the permissions set up on the sql2000 don't allow for you to connect to it.

    What error(s) are you getting?

    Comment

    • jojo41300000
      New Member
      • Apr 2007
      • 32

      #3
      Originally posted by Plater
      Your connection string?
      All connection strings in one place. Find the syntax for your database connection using ADO.NET, ADO, ODBC, OLEDB, C#, VB, VB.NET, ASP.NET and more.


      Or maybe the permissions set up on the sql2000 don't allow for you to connect to it.

      What error(s) are you getting?

      The errors I am getting is:
      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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Sounds like the settings of the SQL server don't allow remote connections.
        You should go through all those permissions and set up everything.

        Comment

        • jojo41300000
          New Member
          • Apr 2007
          • 32

          #5
          Originally posted by Plater
          Sounds like the settings of the SQL server don't allow remote connections.
          You should go through all those permissions and set up everything.
          I tried all the permission setting, but it still won't work.

          Is this the reason two database servers (2000 & 2005) installed on the same server?
          My OS is Window Server 2003 Enterprise x64 Edition.
          MS SQL SERVER 2005 is 64 bit version and MS SQL SERVER 2000 is 32 bit standard edition.

          Any ideas what wrong with this setting?

          Thanks.

          Comment

          • Shashi Sadasivan
            Recognized Expert Top Contributor
            • Aug 2007
            • 1435

            #6
            two different databases will have two different instances.

            You may need to go to the surface area configuration and change settings to allow Tcp IP connections too

            The database might not allow windows authentication, and you may be trying to use that in the connection string.

            Comment

            • jojo41300000
              New Member
              • Apr 2007
              • 32

              #7
              Originally posted by Shashi Sadasivan
              two different databases will have two different instances.

              You may need to go to the surface area configuration and change settings to allow Tcp IP connections too

              The database might not allow windows authentication, and you may be trying to use that in the connection string.

              I used sql authentication. But there is no surface area configuration in SQL server 2000. Instead, I found server network utility and client network utility.

              Actually, I used mostly sql server 2005, and i never used sql server 2000 before.
              I change some of the setting in server network utility such as adding TCP/IP, Name Pipes and setting the port number to 1433 because i found that the default port number is set to 0.

              Comment

              • Shashi Sadasivan
                Recognized Expert Top Contributor
                • Aug 2007
                • 1435

                #8
                I am Not sure of the settings in Sql Server.

                However since this topic is regarding the setings with Sql Server I will move the topic to the Sql Server Group where experts there will be able to help you better.

                -MODERATOR

                Comment

                • jojo41300000
                  New Member
                  • Apr 2007
                  • 32

                  #9
                  Originally posted by Shashi Sadasivan
                  I am Not sure of the settings in Sql Server.

                  However since this topic is regarding the setings with Sql Server I will move the topic to the Sql Server Group where experts there will be able to help you better.

                  -MODERATOR
                  Thanks a lot.

                  -Jason

                  Comment

                  Working...