Edit My.Settings.DatabaseConnectionString

Need4Speed

Member
Joined
Apr 4, 2007
Messages
8
Programming Experience
Beginner
Hi.

I want to be able to let the user change the db connection settings in a form in my application. I can read the connection string with My.Settings.DatabaseConnectionString however when I try to write to it I get a blue line saying DatabaseConnectionString is read-only. How can I make that happen anyways?

Thank u..
 
Change is from (ConnectionString)/ApplicationScope to string/UserScope. Remove all the XML, leaving jsut the conenction string.


You MUST revert it to (ConnectionString)/ApplicationScope AND SAVE IT if you plan to alter the DESIGN any of the datasets in the application.

If you do not revert it, and you attempt to edit a tableadapter query, add a datacolumn, create a new tableadapter, alter a parameter collection etc then you will break the dataset code.

If you forget, and you break it, close the dataset completely, without saving any changes. If you cant get it working thereafter, return here for further advice

The following link has some more info:
http://www.vbdotnetforums.com/showthread.php?t=16425
 
Back
Top