In my software house we need to work with multiple database systems like PostgreSQL, Oracle, Sybase and others.
The solution we have done to this problem was to make a different datamodule to every database system, and keep the same forms. So we have as many projects and datamodule folders as databases we deal with. Each project includes the correct datamodule.
As far as we need to handle database events and each database system has its own way of firing them, we put the TDataSource components on the application forms, not on the datamodule. So we can have database events on the forms instead of the data sets.
The TDataSource has the OnDataChange and OnStateChange which allow you to check what is happening with your data set, but you need to know if is there any opened database transaction, to check if the Post method was called or the data set was in "dsBrowse" state before the event has fired.
We created the InTransaction property on the Datamodule, but it suits better to the TZConnetion like TDatabase, TOraSession and other database connection components has.
What is the latest version of Zeos database components ?
Working with multiple database systems.
Moderators: gto, cipto_kh, EgonHugeist