select data from Oracle, Sql, Mysql database with one query in ASp.NET RRS feed

  • Question

  • User660836111 posted


    I want to get data from 3 type of database having same tables & data, using one query(just passing parameter of type of database.) Please guide me thanks...

    Thursday, February 2, 2017 5:38 AM

All replies

  • User-1509636757 posted

    Based on your complexity of Select Statement, you will require to implement different functions to select data from these different sources. I suggest of writing an Abstract class that will hold common functions declaration and inherit different classes per data source (as name them like Provider classes, for Example) and implement logic to fetch data from different data sources. for SQL Server, you can simply use SQLConnection, SQLCommand (System.Data.SQLClient) (ADO.NET) object to fetch data from SQL Server. For Oracle, MySQL you may require connectors/binaries to download and reference them in your application to write logic to fetch data from different particular sources.

    hope that helps./.

    Thursday, February 2, 2017 6:20 AM
  • User660836111 posted

    using separate functions we can fetch data, that is what I am using right now. I want to know, if there is any interface or other functionality there to use pass just type database a parameter & get data. Some one told me about the interface. But I forgot.

    Monday, February 6, 2017 7:04 AM