Page 1 of 1

UniDAC - application with 2 databases

Posted: Mon 01 Apr 2013 11:51
by stevel
Using: Delphi XE2 Enterprise, Unidac 4.6.12 Pro

I am developing an application with UniDAC that will support different databases (one at a time). My app will give the user the choice to use either SQLite or SQL Server as the engine.

So I would code all my queries in the application, and use TUniQuery to run those SQL queries.

Before I start coding the database support code, I would like to ask you whether you have any design guidelines / best practice about how to approach such situations?

What kind of roadblocks and problems can be expected with the above two databases, and what are the solutions?

This will be an useful post for future reference for other developers as well.

Thanks in advance.

Bests,
Steve Faleiro

Re: UniDAC - application with 2 databases

Posted: Tue 02 Apr 2013 09:20
by AndreyZ
It is better to use the standard SQL queries the syntax of which is common for all database servers. In case when you need to use specific SQL commands, you can use macros which help you to change SQL statements dynamically. For more information, please read the "Unified SQL" and "Macros" articles in the UniDAC documentation.
We do not develop applications that work with database servers, we develop the components that provide the access to database servers. It is up to you to decide what architecture and design to use. If you have any particular questions about using UniDAC with SQLite and SQL Server, we will gladly answer them.

Re: UniDAC - application with 2 databases

Posted: Tue 02 Apr 2013 09:33
by stevel
Thank you, Andrey.

Re: UniDAC - application with 2 databases

Posted: Tue 02 Apr 2013 11:28
by AndreyZ
Feel free to contact us if you have any further questions about UniDAC.