• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

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?  
0
trademark16
Asked:
trademark16
2 Solutions
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now