Multi-DataBase Application Support

  • Thread starter Thread starter kat0
  • Start date Start date
K

kat0

Hi.
I Have to do a muliple database application (think in a simple form
that add, remove, and modify some table/s). But The problem is that
the Database destination depends, can be per example SQL Server or
MySQL, or Oracle or other.
I Think to do a class that inherits from IDBConnection and one
constructor whit one parameter that have TypeOfServer that give me
MsSQL or MySQL per example like a String.
If This paramater is "MsSQL" i return a connection of Type
(System.Data.SQLClient).
Is that posible? i think this or a property of his class.

How can i do it?
Other problem is that i know that i can use SQLClient type for MsSQL
but for MySQL what i use?

And The Off-Toppic Question is.
When you have an application, you use One conecction, and you open
when application start and you close when application ends or you
create an connect on every step you need?

THANKS A LOT.
kat0
 
Back
Top