Hello,
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.

Dave

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?

figured it out on my own :)

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.

commented: stop complaining -2

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

Guess what? I figured it out too and I’m actually going to share my good fortune. See link below
http://www.codeproject.com/KB/vb/PersistConnectionStrings.aspx?display=PrintAll
In response to ‘sknake’
I was just trying to call attention to a thread that was useless and showing up on search engines.

I think it would be in my best interest if I was not a member, or whatever you call people who sign up for this site, any longer.
Enjoy and laters!

At least the guy could mark it as solved...

all talk and no efforts....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.