I need to write an app in such a way that it should not worry about the incoming DBMS. It can be Oracle, PostgreSQL, MySql etc..
The local dbms will be using SQL Server 2008 into which I will be loading data.
What is needed/planning to do…
- The user has textbox(s) where he is able to create/save the connection string vales in the local database/config file for each possible dbms.
- The application then should use this to form the connection string and connect to the incoming database one at a time or concurrently if possible.
- Retrieve the values and put them in the local database.
- No need to write data to the incoming database.Only 1-way.
In short a database independent application to only read values based on a set query and put them in the specified database.
Is it possible to do this or sounding magical?
Any solutions/sample/technique I can develop on?
Application is based on Silverlight + ASP.NET tech.
You should search and study about design patterns. check out this link. Also check out LLBLGen
If you want to opt for your own solution then you have to worked in layers. Define your Data Access Layer (DAL) loosely coupled. One way of doing it could be using interfaces. Define an Interface for database connection and then let each class for DBMS to implement it. Then you can get the database connection string on something on the following lines.
Source:
Then you can use it like: