DABusinessProcessor Custom update Rule

Hi,

I’ve defined a Table view in mysql (say TableA_View) server and it is field definition exactly as Table named TableA.

So in the Schema I’ve two Table one : TableA , TableA_View

TableA as usual and I create Delta Command.

TableA_View: In Statement , I use custom Statement ’ select * from TableA’.

I linked DABusinessProcessor to TableA_View with all insert , update , delete command pointed TableA created Delta Command.

I can update the data in mysql server . But will show the below error

Error:Problem during executing RefreshDataset. Original error was: [FireDAC][Phys][MySQL] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘WHERE
MClass_KEY_SYS = 12’ at line 4

Any Idea?

Also any example or doc to teach how to update Table using DABusinessProcessor.

For Example , I’ve joined view and need update two table. How to execute two update command in DABusinessProcessor.

If we use SendReducedDelta, How to handle it in DABusinessProcessor.

Joe

pls set breakpoint in TDAEBaseDataset.DoSetActive (uDAEBaseDataset.pas) at line NativeDatabaseAccess.Active := True; and check FDataset.GetSQL for errors in SQL.

for simple SQLs like

select fld1, ... fldN from tableA where fld1 = :fld1

DA can generate valid delta commands automatically. this case also work with reduced deltas because pregenerated delta commands aren’t compatible with reduced deltas.

this data is needed for SendReducedDelta mode

  • target tablename
  • valid table mapping
  • PK
  • empty delta commands