UniDAC - application with 2 databases

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
stevel
Posts: 125
Joined: Tue 02 Nov 2010 19:01

UniDAC - application with 2 databases

Post by stevel » Mon 01 Apr 2013 11:51

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

AndreyZ

Re: UniDAC - application with 2 databases

Post by AndreyZ » Tue 02 Apr 2013 09:20

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.

stevel
Posts: 125
Joined: Tue 02 Nov 2010 19:01

Re: UniDAC - application with 2 databases

Post by stevel » Tue 02 Apr 2013 09:33

Thank you, Andrey.

AndreyZ

Re: UniDAC - application with 2 databases

Post by AndreyZ » Tue 02 Apr 2013 11:28

Feel free to contact us if you have any further questions about UniDAC.

Post Reply