I am currently writing a class in vb.net that accesses databases when given the datasource and query. I however have ran into a couple of problems.
I would like to have my class generate a connection string text depending on the data provider the user chooses from a list. How do I have my class determine the right string to place for a provider in the connection string?
For instance, if a computer has Office 2007, it should generate a provider string different from what will be generated by a computer running office 2003.
Just in case you do not get what I mean, When creating a data source with Visual Studio, you typically select a provider from a list in the wizard, choose a database to connect to, and you have a connection string generated for you. I want my class to do the first part; generating valid provider text for the connection string.
Is there any way to do that?
I would prefer the code to be in VB.NET though VB6 is OK with me. I do not know any language other than Visual Basic.
Attached to this post is the class in its most updated state.
The portion I would like to implement the structure I'm talking about is the class ConnectionString; located in the attached file.
Number of downloads: 139