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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Connecting to remote database using C#

Connecting to remote database using C#

Scheduled Pinned Locked Moved C#
csharpdatabasesysadminhelpsql-server
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.
  • S Offline
    S Offline
    stephentanph
    wrote on last edited by
    #1

    Hi there I have been trying to connect a c# windows application to a remote sql server. However, i am still unsuccessful in doing so. Please help here's the software im using visual studio.net sql server 2000 Connecting to a local sql server has no problem however when im trying to connect my c# application to a remote sql server the connection cannot be established. Here are the connection string i tried... so far Data Source=[remote_ip],1433;Network Library=DBMSSOCN;Initial Catalog=pubs;Database='Northwind'; another is Server=[remote computer ip here];Trusted_Connection=sspi;Database='Northwind' Please help me out on this thanks... i don't know what's the problem is it sql server settings? regarding making it remote? or the connection string ... the network connection has no problem so far.. both computers is connected well through a router and recognizes each other. thanks in advance. Stephen Tan

    G J 2 Replies Last reply
    0
    • S stephentanph

      Hi there I have been trying to connect a c# windows application to a remote sql server. However, i am still unsuccessful in doing so. Please help here's the software im using visual studio.net sql server 2000 Connecting to a local sql server has no problem however when im trying to connect my c# application to a remote sql server the connection cannot be established. Here are the connection string i tried... so far Data Source=[remote_ip],1433;Network Library=DBMSSOCN;Initial Catalog=pubs;Database='Northwind'; another is Server=[remote computer ip here];Trusted_Connection=sspi;Database='Northwind' Please help me out on this thanks... i don't know what's the problem is it sql server settings? regarding making it remote? or the connection string ... the network connection has no problem so far.. both computers is connected well through a router and recognizes each other. thanks in advance. Stephen Tan

      G Offline
      G Offline
      Gokulan Venattil
      wrote on last edited by
      #2

      I think there is some problem in ur conn string. Connection string must contain SERVER=myIP;user id=myuserid;password=myPwd;DATABASE=MyDatabaseName Gokul

      1 Reply Last reply
      0
      • S stephentanph

        Hi there I have been trying to connect a c# windows application to a remote sql server. However, i am still unsuccessful in doing so. Please help here's the software im using visual studio.net sql server 2000 Connecting to a local sql server has no problem however when im trying to connect my c# application to a remote sql server the connection cannot be established. Here are the connection string i tried... so far Data Source=[remote_ip],1433;Network Library=DBMSSOCN;Initial Catalog=pubs;Database='Northwind'; another is Server=[remote computer ip here];Trusted_Connection=sspi;Database='Northwind' Please help me out on this thanks... i don't know what's the problem is it sql server settings? regarding making it remote? or the connection string ... the network connection has no problem so far.. both computers is connected well through a router and recognizes each other. thanks in advance. Stephen Tan

        J Offline
        J Offline
        J4amieC
        wrote on last edited by
        #3

        You've not told us the most vital information we need to answer this question... the error message you receive on trying to establish the connection. Assuming its a permission denied, which it probably is, specify a username and password in the connection rather than trying a trusted connection.

        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