Database connection

  • Thread starter Thread starter Peter Kirk
  • Start date Start date
P

Peter Kirk

Hi

I am writing a windows service which needs to access a database (which will
be running on a different machine). I don't know what the database is (maybe
oracle, maybe sql server - it is something that needs to be
configured/installed at deployment time).

How do I make a "connection" to a database? Is there a generic "IConnection"
interface and various "factories" for different databases? For example
IConnection conn = OracleDatabase.GetConnection();
IConnection conn = SqlServer.GetConnection();

Any help/advice appreciated.

Thanks,
Peter
 
Back
Top