about Settings.settings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rick

    about Settings.settings

    Hi guys, i have a question about Settings.settin gs

    I have some datasets in my app, each dataset uses a connection (myCnn)
    created in Settings.settin gs

    if i use
    Properties.Sett ings.Default.my Cnn="otherStrin gConnection";

    i got

    Error 3 Property or indexer 'Usuarios.Prope rties.Settings. myCnn cannot be
    assigned to -- it is read only F:\Treb\Usuario s\Usuarios\Form 1.cs 96 13
    Usuarios

    its only read, how can i modify it? i want to load my string connection from
    a text file and use it in all my app datasets

    Regards.




  • Dave Sexton

    #2
    Re: about Settings.settin gs

    Hi Rick,

    Try setting the property through the indexer:

    Properties.Sett ings.Default["myCnn"] = "otherStringCon nection";

    --
    Dave Sexton

    "Rick" <zatankloz@gmai l.comwrote in message
    news:eb6EGwQCHH A.3540@TK2MSFTN GP03.phx.gbl...
    Hi guys, i have a question about Settings.settin gs
    >
    I have some datasets in my app, each dataset uses a connection (myCnn)
    created in Settings.settin gs
    >
    if i use
    Properties.Sett ings.Default.my Cnn="otherStrin gConnection";
    >
    i got
    >
    Error 3 Property or indexer 'Usuarios.Prope rties.Settings. myCnn cannot be
    assigned to -- it is read only F:\Treb\Usuario s\Usuarios\Form 1.cs 96 13
    Usuarios
    >
    its only read, how can i modify it? i want to load my string connection from
    a text file and use it in all my app datasets
    >
    Regards.
    >
    >
    >
    >

    Comment

    Working...