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. How to connect to remote sql server 2000 in Windows Services created in C#

How to connect to remote sql server 2000 in Windows Services created in C#

Scheduled Pinned Locked Moved C#
csharpdatabasesql-serversysadmintutorial
3 Posts 3 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.
  • R Offline
    R Offline
    Rajesh Koriya
    wrote on last edited by
    #1

    I created Windows Service in C#.net In this Windows Service I successfully connect to local sql server 2000 install in My PC.Then I retrive data from local sql server 2000 and fill that data into one dataset.Now I Want to connect to remote sql server 2000 to insert that data into database of that sql server 2000.

    T M 2 Replies Last reply
    0
    • R Rajesh Koriya

      I created Windows Service in C#.net In this Windows Service I successfully connect to local sql server 2000 install in My PC.Then I retrive data from local sql server 2000 and fill that data into one dataset.Now I Want to connect to remote sql server 2000 to insert that data into database of that sql server 2000.

      T Offline
      T Offline
      Tamer Oz
      wrote on last edited by
      #2

      Seems like changing the connectionstring is enough to change database. Have you changed your connectionstring to connect another database. Is it possible for you ti share the code.

      1 Reply Last reply
      0
      • R Rajesh Koriya

        I created Windows Service in C#.net In this Windows Service I successfully connect to local sql server 2000 install in My PC.Then I retrive data from local sql server 2000 and fill that data into one dataset.Now I Want to connect to remote sql server 2000 to insert that data into database of that sql server 2000.

        M Offline
        M Offline
        mbhosle
        wrote on last edited by
        #3

        You can keep the connection strings in app.config file under the onnectionstrings section and read it using ConfigurationManager.ConnectionStrings

        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