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 can i connect Remote sql server i written code like this following

how can i connect Remote sql server i written code like this following

Scheduled Pinned Locked Moved C#
databasesql-serversysadminquestion
2 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.
  • H Offline
    H Offline
    haneef1
    wrote on last edited by
    #1

    public void Backup() { SQLServer2Class server = new SQLServer2Class(); Databases databases; Database2 database; Backup2Class backup = new Backup2Class(); server.LoginSecure = true; server.Connect("192.168.1.145" , "ad" , "ad123"); //the above ip address is my remote computer ip address and ad is username, ad123 is password of remotecomputer. //i gave userid and password then also it is not working showing exception access is denied databases = server.Databases; string database1="pubs"; database = (Database2) databases.Item(database1, null); backup.PercentCompleteNotification = 1; backup.Database = database.Name; SaveFileDialog saveFileDialog1=new SaveFileDialog(); saveFileDialog1.ShowDialog();

    this is haneef

    R 1 Reply Last reply
    0
    • H haneef1

      public void Backup() { SQLServer2Class server = new SQLServer2Class(); Databases databases; Database2 database; Backup2Class backup = new Backup2Class(); server.LoginSecure = true; server.Connect("192.168.1.145" , "ad" , "ad123"); //the above ip address is my remote computer ip address and ad is username, ad123 is password of remotecomputer. //i gave userid and password then also it is not working showing exception access is denied databases = server.Databases; string database1="pubs"; database = (Database2) databases.Item(database1, null); backup.PercentCompleteNotification = 1; backup.Database = database.Name; SaveFileDialog saveFileDialog1=new SaveFileDialog(); saveFileDialog1.ShowDialog();

      this is haneef

      R Offline
      R Offline
      Rocky
      wrote on last edited by
      #2

      have u added the remote sql server in ur list of sql servers availabel over the network. I dont know if I'm using the rt word for it but anyway. it's shown in the enterprise manager right atthe same level where u see the node for ur local server. I may be wrong but I think u'll get this eror as long as u dont register that. hope it helps Rocky

      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