delphimigrationfiredacunidac

Migrate From DevArt UniDac To FireDac


I've been using UniDac for 2 years now and it was the best solution for me, but because it doesn't support Asynch query's i have to move on to FireDac is there any quick migration wizard or something that i can use because i have around 200+ TUniStoredProc components in my form and i would like to convert them to TFDStoredProc, doing every one of them by hand would take allot of time, and that i dont have, I would like to replace them the old TUniStoredProc with the TFDStoredProc

my setup:

Embarcadero Rad Studio XE5

the components are connected to MSSQL database


Solution

  • Here is the sollution ** Warning not perfect, ant may cause DataBinding loss to opened forms ** so please recheck all databindings once finished also have a backup just in case.

    1. Download and install NotePad++
    2. Install it and open it press CTRL+SHIFT+F select find in files
    3. Find What: TUniStoredProc Replace with: TFDStoredProc Filters: .pas;.dfm Directory: you project directory
    4. press Replace In Files
    5. Find What: TUniConnection Replace with: TFDConnection Filters: .pas;.dfm Directory: you project directory
    6. press Replace In Files
    7. Find What: ;1 Replace with: (leave empty) Filters: *.dfm Directory: you project directory
    8. press Replace In Files
    9. Open Delphi, then Open the project it will give you some errors about not finding properties press ignore all
    10. check all the settings of Connections and DataBindings then recompile

    i tried the AnyDac addon which would basically to the same but you would need to generate a rule text file for UniDac, this is the best one i have right now if you come up with a better one i will accept that answer.