New RO SDK throws updWhereKeyOnly for insert statement

We get an exception on a table without a primary key.
We use a custom update and delete command.
No custom insert command.
It looks like an insert is giving us trouble.
Schouldn’t it be possible to insert without a primary key field?

How do we make the code work with the new SDK version?

We are now using RO 10.0.0.1597

Go be clear, this used to work before, and is broken/changed in latest, or you never tried/needed his before?

In either rebase, yeah I agree IMHO insert should be allowed w/o a PK (though I dont generally recommend having any data tabes without a PK…)

Logged as bugs://D19512.

bugs://D19512 was closed as fixed.

Hi,

pls update uDABusinessProcessor.pas as

function TDABusinessProcessor.GenerateSQL2(aChangeType: TDAChangeType;
...
  lUpdateMode := fUpdateMode;
  DAError((aChangeType <> ctInsert) and (aDelta.KeyFieldCount = 0) and (lUpdateMode = updWhereKeyOnly), err_updWhereKeyOnly_noPK); //<<< changed
  lPKList := TStringList.Create;

launch C:\Program Files (x86)\RemObjects Software\Build\install_DA.cmd with admin rights for rebuilding .dcu and .bpl

Yes, our code hasn’t changed. It’s a result of a change in RO/DA

Thanks for the quick fix

1 Like