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 accessing

remote database accessing

Scheduled Pinned Locked Moved C#
databasesysadmin
6 Posts 4 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.
  • D Offline
    D Offline
    dayya
    wrote on last edited by
    #1

    I want to connect to a database and retrieve and insert data which is in another server.which means the database is not in our server. it may be in another server globally remote. this is about an asp web application. please reply me as soon as possible dayya

    gayan

    P M 2 Replies Last reply
    0
    • D dayya

      I want to connect to a database and retrieve and insert data which is in another server.which means the database is not in our server. it may be in another server globally remote. this is about an asp web application. please reply me as soon as possible dayya

      gayan

      P Offline
      P Offline
      Pankaj Joshi
      wrote on last edited by
      #2

      One solution of this problem is create a web service and communicating with SOAP.

      Regards Pankaj Joshi If you want to shape your dreams into reality, please wake-up...

      D 1 Reply Last reply
      0
      • P Pankaj Joshi

        One solution of this problem is create a web service and communicating with SOAP.

        Regards Pankaj Joshi If you want to shape your dreams into reality, please wake-up...

        D Offline
        D Offline
        dayya
        wrote on last edited by
        #3

        I'm a beginner to .net. can you please explain how to do that

        gayan

        M P 2 Replies Last reply
        0
        • D dayya

          I'm a beginner to .net. can you please explain how to do that

          gayan

          M Offline
          M Offline
          Mustafa Ismail Mustafa
          wrote on last edited by
          #4

          Are yo trying to connect to it from the DB itself? As in from one DB to another that's on a different server? If so then you more appropriately it should be posted in the SQL forums. If you're doing this from C# then, unless its on a different vlan, then you need a web service (definition: Clickety[^]). If its on the same lan (read network) then you need to be more specific in specifying your connection string by specifying the server name or the IP address (more on that here: Clickety 2[^]) Web Services are not .Net specific, so don't blame your lack of understanding on .Net. There are many articles here that explain Web Services and give you examples. Here, I'll do your lazy work for you: (Clickety 3[^]) You also might want to try the ultimate answer tool. I mean this Clickety 4[^] rather than anything else.

          "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook "There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib "Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"

          1 Reply Last reply
          0
          • D dayya

            I'm a beginner to .net. can you please explain how to do that

            gayan

            P Offline
            P Offline
            Pankaj Joshi
            wrote on last edited by
            #5

            Please search for creating web services in .net

            Regards Pankaj Joshi If you want to shape your dreams into reality, please wake-up...

            1 Reply Last reply
            0
            • D dayya

              I want to connect to a database and retrieve and insert data which is in another server.which means the database is not in our server. it may be in another server globally remote. this is about an asp web application. please reply me as soon as possible dayya

              gayan

              M Offline
              M Offline
              Maharishi Bhatia
              wrote on last edited by
              #6

              There are two options of doing that. 1. You can access it via our normal ADO.Net by creating the connection to that server and doing what you want on that server. 2. If your database server is MS SQL Server then you can create what is called a linked server... in this case you have to connect to you own server and fire select and insert queries on the remote server. Hope this helps.. Maharishi

              Nothing is Impossible. Even impossible spells "i m possible"

              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