Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Error:An error has occurred while establishing a connection to the server

Error:An error has occurred while establishing a connection to the server

Scheduled Pinned Locked Moved Database
helpquestiondatabasesql-serversysadmin
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    My Article
    wrote on last edited by
    #1

    how do i clear this 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 not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) i'm using sql2005...in online exam quiz.. plz help me..

    P 1 Reply Last reply
    0
    • M My Article

      how do i clear this 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 not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) i'm using sql2005...in online exam quiz.. plz help me..

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      What are the details of your connection string?

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      M 1 Reply Last reply
      0
      • P pmarfleet

        What are the details of your connection string?

        Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

        M Offline
        M Offline
        My Article
        wrote on last edited by
        #3

        mycon.ConnectionString = "Server=(local);DataBase=im;Integrated Security=True" mycom = New SqlCommand("INSERT INTO quiz1(Result,Email) values('" + strResult + "','" + TextBox1.Text + "')", mycon) mycon.Open() mycom.ExecuteNonQuery() mycon.Close() i'm using Vb script and Asp.net... db is Sql 2005.. this program is running on localhost but didnt run external... what can i do?

        P 1 Reply Last reply
        0
        • M My Article

          mycon.ConnectionString = "Server=(local);DataBase=im;Integrated Security=True" mycom = New SqlCommand("INSERT INTO quiz1(Result,Email) values('" + strResult + "','" + TextBox1.Text + "')", mycon) mycon.Open() mycom.ExecuteNonQuery() mycon.Close() i'm using Vb script and Asp.net... db is Sql 2005.. this program is running on localhost but didnt run external... what can i do?

          P Offline
          P Offline
          pmarfleet
          wrote on last edited by
          #4

          mananth wrote:

          mycon.ConnectionString = "Server=(local);DataBase=im;Integrated Security=True"

          You are using Integrated Security to connect to SQL Server. Does the account that your ASP.NET web app is running under have the required permissions to access the SQL database?

          Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups