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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top