GetWhere (TSDataRemoteObject)
<source lang='delphi'>class function GetWhere(const iWhere,iOrderBy:string; Args:Array of variant):TSDataRemoteObject;</source>
Cette fonction retrouve une ressource SData par une recherche.
![]() |
Tip : Cette méthode utilise un fournisseur de service enregistré dans l'Administration |
iWhere | La clause Where de recherche. |
iOrderBy | La clause de tri de recherche. |
iArgs | Les arguments de la clause Where. |
Exemple :
<source lang="delphi"> var inst:RE_Expense; aReason:string; begin
aReason := Format('expense du %s',[FormatDatetime('c',Now)]);
inst := RE_Expense.Create; inst.reason := aReason; inst.dateExpense := Now; inst.quantity := 1; inst.status.AsVariant := RE_NDF_STATUS_DRAFT; inst.Post;
showMessage(Format('oid:%s id:%s key:%s etag:%s',[inst.OID,inst.SDataID,inst.SDataKey,inst.SDataEtag]));
inst := RE_Expense.GetWhere('reason=%1','dateExpense',[aReason]) as RE_expense; if Assigned(inst) then begin if inst.reason = aReason then showMessage('create ok') else showMessage('create failed') end else showMessage('not found after create');
end; </source>
Voir aussi
{{#if:Classe entité de service distant (stereotype)|
{{#if:Classe entité de service distant (stereotype)|— Classe entité de service distant (stereotype) |}} — Développement DSM —
|
{{#if:|— [[{{{1}}}]] |}} — Développement DSM —
}}