DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2007

    dynamic database connection

    For one of my projects, i need to develop a product in .net which will be connecting to a company's database to run specific queries. The database is unknown at development time.

    1. Which component is able to let the user dynamically select a database connection and return a connection string such that i can save it? Or is there a better way to do this in .net code easily?

    2. Given that connection string, and a usergiven query for that database, for how can i run that query? Is there a generic datareader, executescalar, etc

    any help much appreciated!!!!!


  2. #2
    Join Date
    May 2007
    1) Create a common interface for the database operations.
    2) You can have separate dll for each of the database you wish to support implementing the interface.
    3) Load the appropriate dll runtime based on the database selected.
    4) Make all your implementation based on the interface methods.

    I guess this should help you to solve your problem.


Similar Threads

  1. Replies: 1
    Last Post: 11-18-2002, 08:45 AM
  2. ADO Recordset
    By deepa george in forum VB Classic
    Replies: 11
    Last Post: 08-21-2002, 08:20 AM
  3. Java Beans and Database connection
    By vinod in forum Java
    Replies: 1
    Last Post: 04-04-2001, 04:06 AM
  4. Blocking problem with DSN-less connection
    By Adam Dawes in forum VB Classic
    Replies: 3
    Last Post: 12-21-2000, 11:50 AM
  5. ADO Opening a connection with a database
    By PAOLINO MONTANINO in forum VB Classic
    Replies: 0
    Last Post: 10-26-2000, 04:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.