2
I have a simple example, but in three layers, with sqldataset + datasetprovider + clientdataset. I do not load any field in sqldataset. In datasetprovider I leave the updatemode in upwherekeyonly.
In datasetprovider I leave allowcommandtext as true to be able to receive client-side commandtext via clientdataset. On the client side I load the Fields with Select * ... and during the run time I send the commandtext with a Join so that it brings only the fields already loaded. When I try to edit some record and give applyupdates in onreconcileerror event I get:
Unable to Find Record. No Key especified
Use xe5+dbexpress+mysql. The question is how do I configure components to edit and update records coming from a command with Join?
SUMMING UP THE DISCUSSION
You can leave all the default settings of Delphi, the only thing you need is to put in the event Ongettablename of the datasetprovider the name of the table to be updated, this solved all my problems.
@Capauto thanks for the reply when arrive on pc I return you. Just remembering, as I said above, in my Internet I don’t bring fields from another table, only from one, I do like two filtering in a table, master/detail.
– Artur_Indio
In this case ignore the portion of taking fields from update and Where, just change the key field and set the table name. It’s been a long time since I’ve touched datasets but if I remember correctly we did so. Anything only notifies here that I can help more if you don’t solve.
– Caputo
worked out, really the problem was not having the ongettable event the table name, thank you very much!
– Artur_Indio
now the problem is that it does not edit or delete, but saves, it appears: Unable to find record. No key specified.
– Artur_Indio
I managed to solve, I put instead of upwherekeyonly, upwhereall. Many thanks again.
– Artur_Indio