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. General Programming
  3. C#
  4. Remote database connection

Remote database connection

Scheduled Pinned Locked Moved C#
helpdatabasesql-serversysadminquestion
11 Posts 6 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.
  • W Offline
    W Offline
    wheelerbarry
    wrote on last edited by
    #1

    Im using sql server 2005 and trying to connect to a remote database, but i get the error "SQL Server does not exist or access denied". There is not problem with the code and it has worked many times on other projects and will connect to the database when run locally. The database has also been setup to accept remote connections, but i still cannot get a connection. Any ideas? Thanks for any help.

    E C A E 4 Replies Last reply
    0
    • W wheelerbarry

      Im using sql server 2005 and trying to connect to a remote database, but i get the error "SQL Server does not exist or access denied". There is not problem with the code and it has worked many times on other projects and will connect to the database when run locally. The database has also been setup to accept remote connections, but i still cannot get a connection. Any ideas? Thanks for any help.

      E Offline
      E Offline
      ednrgc
      wrote on last edited by
      #2

      Is there a question?

      W C 2 Replies Last reply
      0
      • E ednrgc

        Is there a question?

        W Offline
        W Offline
        wheelerbarry
        wrote on last edited by
        #3

        Yes, just though i would build some suspence before i asked it.

        1 Reply Last reply
        0
        • E ednrgc

          Is there a question?

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          ednrgc wrote:

          Is there a question?

          Does "Any ideas?" not count?


          Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

          E 1 Reply Last reply
          0
          • W wheelerbarry

            Im using sql server 2005 and trying to connect to a remote database, but i get the error "SQL Server does not exist or access denied". There is not problem with the code and it has worked many times on other projects and will connect to the database when run locally. The database has also been setup to accept remote connections, but i still cannot get a connection. Any ideas? Thanks for any help.

            C Offline
            C Offline
            Colin Angus Mackay
            wrote on last edited by
            #5

            Have you checked the firewall between the computers. It might be blocking the port.


            Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

            W 1 Reply Last reply
            0
            • C Colin Angus Mackay

              Have you checked the firewall between the computers. It might be blocking the port.


              Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

              W Offline
              W Offline
              wheelerbarry
              wrote on last edited by
              #6

              Windows firewall is turned off and there is no other firewall in-between the boxes.

              M 1 Reply Last reply
              0
              • W wheelerbarry

                Windows firewall is turned off and there is no other firewall in-between the boxes.

                M Offline
                M Offline
                Michael P Butler
                wrote on last edited by
                #7

                wheelerbarry wrote:

                Windows firewall is turned off and there is no other firewall in-between the boxes.

                Has the server been configured to use a different port? Can you get Enterprise Manager/ SQL Management studio / Query Analyzer to connect?

                Michael CP Blog [^] Development Blog [^]

                1 Reply Last reply
                0
                • C Colin Angus Mackay

                  ednrgc wrote:

                  Is there a question?

                  Does "Any ideas?" not count?


                  Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

                  E Offline
                  E Offline
                  ednrgc
                  wrote on last edited by
                  #8

                  When I posted my reply, there was absolutely nothing in the original post. Hence my asking if there was a question.

                  C 1 Reply Last reply
                  0
                  • E ednrgc

                    When I posted my reply, there was absolutely nothing in the original post. Hence my asking if there was a question.

                    C Offline
                    C Offline
                    Colin Angus Mackay
                    wrote on last edited by
                    #9

                    ednrgc wrote:

                    When I posted my reply, there was absolutely nothing in the original post. Hence my asking if there was a question.

                    Ah... That makes sense. It also seems to be intermittent whether the post is marked as "Modified" or not. (Perhaps because the poster can remove that text if they wish)


                    Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

                    1 Reply Last reply
                    0
                    • W wheelerbarry

                      Im using sql server 2005 and trying to connect to a remote database, but i get the error "SQL Server does not exist or access denied". There is not problem with the code and it has worked many times on other projects and will connect to the database when run locally. The database has also been setup to accept remote connections, but i still cannot get a connection. Any ideas? Thanks for any help.

                      A Offline
                      A Offline
                      Aaron VanWieren
                      wrote on last edited by
                      #10

                      Can you connect with VS. If so you could verify the connection strings via vs.

                      _____________________________________________________________________ Our developers never release code. Rather, it tends to escape, pillaging the countryside all around. The Enlightenment Project (paraphrased comment) Visit Me at GISDevCafe

                      1 Reply Last reply
                      0
                      • W wheelerbarry

                        Im using sql server 2005 and trying to connect to a remote database, but i get the error "SQL Server does not exist or access denied". There is not problem with the code and it has worked many times on other projects and will connect to the database when run locally. The database has also been setup to accept remote connections, but i still cannot get a connection. Any ideas? Thanks for any help.

                        E Offline
                        E Offline
                        Eric Georgiades
                        wrote on last edited by
                        #11

                        Connecting to SQL Server 2005 (and Express) has one slight difference in how you point to the sql server. In previous versions you would say the server's ip or name when requested (i.e. localhost or (local)) but it 2005, you need to put the server and the sqlserver (i.e. localhost/sqlserver) In Sql Server 2005 Express, point to it using ".\sqlexpress" Although i didn't quite understand what you are trying to do, or how, i hope this helped.

                        Ericos Georgiades

                        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