multiple databases connection

  • i hav made one application in asp.net(c#) using SqlServer(background).i want to run this application using Access ,oracle and Mysql...can i do this??? how can i do this????plz reply

  • You would change the connection string for each platform, and would need drivers to connect to each server.

    Note that each of these products uses a different version of SQL, so your queries might not work against other platforms without modification.

  • There are two ways to go about doing this:

    1. Design the database and SQL code that is generic and DBMS agnostic. (Essentially nothing beyond basic SELECT/INSERT/UPDATE/DELETE and ANSI standard datatypes).

    2. Follow a provider model for your data access allowing you to write custom provider classes for each DBMS that leverages the types and procedural characteristics of each appropriately.

    Number 1 is faster, number 2 is more scalable and better architecture. Very few applications that run database agnostic perform well from my experience, it just takes to much work to properly build the databases and data access providers to properly utilize the database platforms so things end up very generic and you transport more data to the application code for processing instead of processing things database side where appropriate.

    Out of curiousity, why do you want to do this? SQL Express is free for up to 4GB databases so I'd ax Access off the list for a website immediately.

    Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
    My Blog | Twitter | MVP Profile
    Training | Consulting | Become a SQLskills Insider
    Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply