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. Web Development
  3. ASP.NET
  4. Dynamic Connection String

Dynamic Connection String

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasesysadmin
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.
  • K Offline
    K Offline
    Kuricheti
    wrote on last edited by
    #1

    Hi, I am developing a web application using c#. My application login form takes 4 values like Server Name, Database Name, UserName, and Password. I want to create a connectionstring based on this values in log form at runtime. Thanks in advance Hari

    C 1 Reply Last reply
    0
    • K Kuricheti

      Hi, I am developing a web application using c#. My application login form takes 4 values like Server Name, Database Name, UserName, and Password. I want to create a connectionstring based on this values in log form at runtime. Thanks in advance Hari

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      A connection string is just a string. You can just build it in memory, the trick is, you need to store it somewhere ( the session, probably ), in order for it to then be available when you want to use it.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      M 1 Reply Last reply
      0
      • C Christian Graus

        A connection string is just a string. You can just build it in memory, the trick is, you need to store it somewhere ( the session, probably ), in order for it to then be available when you want to use it.

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        M Offline
        M Offline
        Mark Churchill
        wrote on last edited by
        #3

        Theres also a handy ConnectionStringBuilder class. See here http://msdn2.microsoft.com/en-us/library/ms254978(VS.80).aspx[^]

        Mark Churchill Director Dunn & Churchill

        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