You are not logged in.
Hi,
I have the follow situation
TSQLmyTable = class(TSQLRecord)
private
FField_1: integer;
FField_2: integer;
published
Field_1: integer read FField_1 write FField_1;
Field_2: integer read FField_2 write FField_2;
end;
...
{ in the model creation }
...
VirtualTableExternalRegister(Result, TSQLmyTable, pPropConexion, 'MY_TABLE');
Result.Props[TSQLmyTable].ExternalDB.
MapField('ID','ID_MYTABLE').
MapField('Field_1','FIELD_ONE').
MapField('Field_2','FIELD_TWO').
SetOptions([rpmNoCreateMissingTable, rpmNoCreateMissingField, rpmAutoMapKeywordFields]);
The TSQLmyTable point to an external DB (Firebird), and is maped to his real names.
The inserts, an updates are OK, but the Deletion in the follow way fails.
...
myRest.Delete(TSQLmyTable, 'FField_1 > 3')
...
or same SQLWhere where the count of IDs to delete was more than 1.
( when count of IDs is 1 run OK)
According to previous threads, I see that "myRest.Delete(aTable: TSQLRecordClass; SQLWhere: TRawUTF8)", first executes a select and obtains all the IDs that will be deleted according to the SQLWhere, to proceed with the "OnUpdateEvent" on the server.
As I can verify according to the trace, the "select" executes well and returns the list of IDs, but the "delete" fails and shows errors in the names of nonexistent fields, by the use of TSQLRecord names and not the real names of the database .
I do not understand why the select works well and the delete works poorly, both called with the same SQLWhere.
Any coments ar welcome... thanks
Online
There was indeed a problem here.
Please try https://synopse.info/fossil/info/ad37d9d785
Offline
Thanks ab, you work at the speed of light. Everything works ok.
Online