Doubt Client-server system migration, FireDac for more than 1 database?

2

A system was developed using Firebird is dbexpress, to migrate this system so that it would be possible to use more than 1 database, what would be the best solution? In Delphi XE we have the FireDac with access to multiple databases, most when using (SQLQuery + DataSetProvider + ClientDataSet) fields are field types of the table in question are loaded, plus these types are not the same for both banks in this if FireDac can handle data types within it or is there any other way to do it? Thank you

    
asked by anonymous 31.10.2015 / 18:41

1 answer

1

Yes, FireDac can do this. We went through the same situation, but in my case, it was decided to use the DevArt components. I suggest you first create custom connection components so you can handle the differences between banks.

For example:

FireBird:

  

Select first 1 ID from Table

PostgreSQL:

  

Select ID from Table Limit 1

These and other differences could be addressed in your custom component.

As for the type of the field in the table, I think most of them would be the same except for Blob type in Firebird, where we usually use Bytea / Text in PostgreSQL

I also suggest that you mount the SQL command at runtime, so you take advantage of the Drive and it even brings you the right kind of Field, as well as ensuring that the Fields will always be up to date without having to maintain source code .

    
23.06.2016 / 14:43