I just asked here if there was a general way to get tables names and created tables on a database.
I need this because my application connects to a database and has some basic database edition functionality like creating tables with a wizard. But now I want the user to be able to select from a range of possible database engines (right now it only uses the Jet engine).
Most people told me this was not possible and that I would need to create an abstract layer with implementations for each database engine. But I just found NHibernate and it seems to me that it generates SQL queries for a wide range of database engine (I’m not sure if the Jet engine is included). So my question is, can I use NHibernate to achieve this?
Yes you can, as long as the database schema is the same across the different databases.
Here’s a list of database engines supported by NHibernate (including Microsoft Jet) and the configuration settings required in order to work with them:
However be aware that the level of support for the different database engines may vary, so make sure you research any known issues NHibernate may have with the specific database you are going to use.