VB.net to connecto to different databases

I’m struggling on how to get my VB.net test app to connect to different databases.  I’ve been googling the topic for a couple of days now.  It seems to be something a lot of people struggle with.

With the current PowerBuilder application, we use the registry to point to a database.  Before the current  local app runs, it writes the database name to the registry from a config file.  At the very top, we get the database name from the registry.  We then construct a connection string.  We put all of this into the SQLCA structure.  And then connect.  Effectively, we control what database we connect to by manipulating the configuration file which helps create the registry.  

I’m looking to duplicate the ability to control the database connection for my test app without using the registry if possible.

How can i accomplished this task?  
trademark16Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kodok_gorengCommented:
Maybe you can try to do the
- Import.System.Data.sqlclient
- Import.System.Data.Oledb
and so on in accordance with the requirement to connect to the database used
references the connection string http://www.connectionstrings.com/
Then you can use the dataset
0
trademark16Author Commented:
Both answers were helpful so i split the points.  Thanks for your help guys.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.