Is it possible to change the connection string after setting up a Data Source?

I'd like to set up a Data Grid View, but the user must be able to change the location of the database file at a later time (over a network).

i've been trying:

My.Settings.db1ConnectionString1 = strDatabase

but i get an error stating that db1ConnectionString1 is ReadOnly, and there doesn't seem to be any way around that? Or is there? Or is there a better way to do this?

Thanks for your help and incite.


10 Years
Discussion Span
Last Post by Arunabh Nag

Otherwise, I know how to set up my application to access a database manually using OleDb, but I don't know how to fill a data grid view with the data from that database.

Anyone know how to do that?


Does anyone monitor these boards? This is the most annoying thing to find on a group. A person asks a question it isn’t answered, I really don’t care if it is or it isn’t but the person replies to themselves and says “I figured it out”. No explanation of how the poster figured it out and the thread shows up in a Google search. What a waste of time. Not to mention the time I am wasting posting to an almost 2 year old worthless thread. Y’all have a wonderful day

Oh btw
I am still looking for a way to dynamically change my connection string for My.Settings.ConnectionString while my vb.net windows form application is running. I’m using Access 2007.

Votes + Comments
stop complaining

Maybe if you started your own thread instead of posting to an old thread you would receive help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.