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. app.config file

app.config file

Scheduled Pinned Locked Moved C#
databasehelpquestion
1 Posts 1 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
    rcwoods
    wrote on last edited by
    #1

    Hi I need help. Have drag-and-drop for the components eg. dataset, bindingsource and table adpters. There is now a default connection string in my app.config file. The user can now ,using FileOpenDialog on the main form, choose a different database if they want. I simply take this path as a public static string and assign it as the new connectionString. obviously now the dataset must change accordingly. which is does on this main form. but as soon as i load a child form and still want to use this new dataset obviously, the connection string is changed in the designer code of the tableAdapter.fill() method back to the default connectionstring in the app.config file. Declaring my connection string as a public static variable worked perfectly in another project where i actually programmatically created my dataset,bindingsource and table adapters. Is this one of the limitations one has when using drag and drop components??:confused: Please if someone could help me..

    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