Runtime

Discussion in 'ASP .Net' started by Kenny, Apr 30, 2004.

  1. Kenny

    Kenny Guest

    Hi,
    Is it possible to have the connection string change during runtime? How?
    Thanks,
    Kenny
     
    Kenny, Apr 30, 2004
    #1
    1. Advertisements

  2. Kenny

    CT Guest

    Sure, although if you change it when the connection is open, you need to
    close and reopen the connection. A simple assignment might be what you're
    after (ConnectionString = "..."). Perhaps you want to be able to do it from
    outside of your cide, in whiuch case you should look into dynamic properties
    or simply loading the connectionstring from you .config file.

    --
    Carsten Thomsen
    Enterprise Development with VS .NET, UML, and MSF
    http://www.apress.com/book/bookDisplay.html?bID=105
    "Kenny" <> wrote in message
    news:%...
    > Hi,
    > Is it possible to have the connection string change during runtime? How?
    > Thanks,
    > Kenny
    >
    >
     
    CT, Apr 30, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Polo Lee
    Replies:
    0
    Views:
    2,997
    Polo Lee
    Jul 7, 2003
  2. Sean
    Replies:
    2
    Views:
    1,657
    Carl Prothman [MVP]
    Jul 26, 2003
  3. Mr. x
    Replies:
    0
    Views:
    1,091
    Mr. x
    Aug 30, 2003
  4. Scott Meddows

    Re: How to add eventHandlers at runtime?

    Scott Meddows, Sep 2, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,918
    Mattias Sjögren
    Sep 6, 2003
  5. Microsoft
    Replies:
    0
    Views:
    3,055
    Microsoft
    Sep 4, 2003
  6. Satish
    Replies:
    0
    Views:
    1,031
    Satish
    Nov 13, 2003
  7. Timothy
    Replies:
    1
    Views:
    612
    Gaurav Khanna [C# MVP]
    Jan 27, 2004
  8. Hal Vaughan
    Replies:
    11
    Views:
    1,483
    Gordon Beaton
    May 22, 2006
Loading...