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. LINQ
  4. How to Change ConnectionString to an "ADO.NET Entity Data Model" at runtime

How to Change ConnectionString to an "ADO.NET Entity Data Model" at runtime

Scheduled Pinned Locked Moved LINQ
questioncsharphelptutorial
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
    SIlviaTerzi
    wrote on last edited by
    #1

    Hello, I really hope someone can help me, I do not know how to do. I've created an ado .net entity model (called model.edmx) in my site web and I have to change the connection string dinamically. After that I want to refresh data in a gridview that has, like datasource, an entitydatasource linked to model. How can i do?? Thanks in advance, Silvia Terzi

    I 1 Reply Last reply
    0
    • S SIlviaTerzi

      Hello, I really hope someone can help me, I do not know how to do. I've created an ado .net entity model (called model.edmx) in my site web and I have to change the connection string dinamically. After that I want to refresh data in a gridview that has, like datasource, an entitydatasource linked to model. How can i do?? Thanks in advance, Silvia Terzi

      I Offline
      I Offline
      Ian McCaul
      wrote on last edited by
      #2

      I believe this can be done in the constructor of the context when its used. Take a look ObjectContext Constructor[^]

      S 1 Reply Last reply
      0
      • I Ian McCaul

        I believe this can be done in the constructor of the context when its used. Take a look ObjectContext Constructor[^]

        S Offline
        S Offline
        SIlviaTerzi
        wrote on last edited by
        #3

        I can't understand how it works. Can you tell me where to find an example? Thanks, Silvia

        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