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. Other Discussions
  3. Article Writing
  4. Database connection without DSN

Database connection without DSN

Scheduled Pinned Locked Moved Article Writing
databasequestionsql-serversysadminhelp
4 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.
  • R Offline
    R Offline
    Renjith Ramachandran
    wrote on last edited by
    #1

    how can i connect in to a database without specifying the DSN name in the connection string ?, i heard some string with the combination of SERVER ; DATABASE and DRIVER can do that ! i tried but i couldnt.. any idea? thanks in advance Situation : my program uses SQL server as database( local / remote ). user can add multiple companies( each company creates as seperate database), and i connects them via DSN , the problem is the DSN is creating in local machine. but the company details keeps in remote machine, any user connects to the remote machine can view the companies but he couldnot connect to that bcz the DSN resides in local machine from where the company was creted. if there is any machanism to represent the DSN detailes in remote machine ( Table entries), i can connect into companies by using those info without depending the local DSN Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.

    J 1 Reply Last reply
    0
    • R Renjith Ramachandran

      how can i connect in to a database without specifying the DSN name in the connection string ?, i heard some string with the combination of SERVER ; DATABASE and DRIVER can do that ! i tried but i couldnt.. any idea? thanks in advance Situation : my program uses SQL server as database( local / remote ). user can add multiple companies( each company creates as seperate database), and i connects them via DSN , the problem is the DSN is creating in local machine. but the company details keeps in remote machine, any user connects to the remote machine can view the companies but he couldnot connect to that bcz the DSN resides in local machine from where the company was creted. if there is any machanism to represent the DSN detailes in remote machine ( Table entries), i can connect into companies by using those info without depending the local DSN Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.

      J Offline
      J Offline
      Jeff Martin
      wrote on last edited by
      #2

      string connectionString = "DRIVER={SQL Server};SERVER=ServerName;DATABASE=DatabaseName;UID=User; PWD=Password"; Jeff Martin My Blog

      R 1 Reply Last reply
      0
      • J Jeff Martin

        string connectionString = "DRIVER={SQL Server};SERVER=ServerName;DATABASE=DatabaseName;UID=User; PWD=Password"; Jeff Martin My Blog

        R Offline
        R Offline
        Renjith Ramachandran
        wrote on last edited by
        #3

        yes i tried this , but the problem is the database is not changing..:( always i gets the database which one i connects first.. Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.

        J 1 Reply Last reply
        0
        • R Renjith Ramachandran

          yes i tried this , but the problem is the database is not changing..:( always i gets the database which one i connects first.. Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.

          J Offline
          J Offline
          Jeff Martin
          wrote on last edited by
          #4

          I'd have to see some code and this is not the correct forum for a discussion of database issues, this is for article ideas. Jeff Martin My Blog

          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