I've given a project to obtain the feasibility to make a dll that takes some inputs for example database title(Mysql,access, sql, oracle etc.) and more inputs to develop a query and according to the dll should return a recordset towards the application.

could it be advisable. if so then what inputs must i consider

It's totally achievable, the problems arise whenever you encounter different SQL grammars - have a look at just how Hibernate handles this by using Dialects.

The most popular databases - Oracle, Sybase, MS SQL Server, MySQL - have slight variations within the SQL grammar they permit. Essentually the suppliers have implemented and extended ANSI SQL diversely.

The easiest situation I'm able to think about happens when how you assign pseudonyms to column names, some databases require this:

SELECT x AS y FROM some_table

while some require:

SELECT x y FROM some_table

There's a lot more such good examples, but the end result is that after writing a question abstraction layer that actually works across all databases you have to abstract the idea of SQL generation to ensure that it may be customized to every database you will support (when i stated, Hibernate performs this by permitting you to definitely specify a dialect specific towards the database you're using).