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. Database & SysAdmin
  3. Database
  4. Connection string problem

Connection string problem

Scheduled Pinned Locked Moved Database
3 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.
  • S Offline
    S Offline
    Saira Tanwir
    wrote on last edited by
    #1

    hi i'm trying to connect to the server without giving the static connection string. i want my application to access the connection string automatically. i'm using the follwoing code, but it doesn't give the connection string

    ConnectionString = @"";
    conn = new OleDbConnection(ConnectionString);
    cmd = conn.CreateCommand();

    can u please explain that what am i missing, as i've already used the same code once and it is still working, but now that i am using the same code at some other location in the application it is not working. thanku for the time

    M 1 Reply Last reply
    0
    • S Saira Tanwir

      hi i'm trying to connect to the server without giving the static connection string. i want my application to access the connection string automatically. i'm using the follwoing code, but it doesn't give the connection string

      ConnectionString = @"";
      conn = new OleDbConnection(ConnectionString);
      cmd = conn.CreateCommand();

      can u please explain that what am i missing, as i've already used the same code once and it is still working, but now that i am using the same code at some other location in the application it is not working. thanku for the time

      M Offline
      M Offline
      Marcus J Smith
      wrote on last edited by
      #2

      ConnectionString = ConfigurationManager.ConnectionStrings("YourConnectionString")


      CleaKO

      "I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy
      "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)

      S 1 Reply Last reply
      0
      • M Marcus J Smith

        ConnectionString = ConfigurationManager.ConnectionStrings("YourConnectionString")


        CleaKO

        "I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy
        "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)

        S Offline
        S Offline
        Saira Tanwir
        wrote on last edited by
        #3

        thank u

        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