Where (cursor)
De Wiki1000
(Différences entre les versions)
(Page créée avec « <source lang='delphi'>property Where:string;</source> Propriété en '''lecture / écriture'''. Cette propriété contient le critère de recherche objet permettant de sél… ») |
|||
| Ligne 6 : | Ligne 6 : | ||
'''Exemple :''' | '''Exemple :''' | ||
| + | |||
<source lang='delphi'> | <source lang='delphi'> | ||
| + | function getCursor:TCursor; | ||
| + | var | ||
| + | vDOLCursorList : TCursor; | ||
| + | vWhere : String; | ||
begin | begin | ||
| + | vDOLCursorList := ClassManager.CreateCursor('TDetailOperationLogistique'); | ||
| + | vDOLCursorList.Where := '(oidLotProduit = %1) and (oidDepot = %2) and (dateExecution >= %3)'; | ||
| + | vDOLCursorList.ArgCount := 3; | ||
| + | vDOLCursorList.Args[1] := aOidLotProduit ; | ||
| + | vDOLCursorList.Args[2] := aOidDepot ; | ||
| + | vDOLCursorList.Args[3] := aDate ; | ||
| + | // | ||
| + | vDOLCursorList.NOLOCK := TRUE; | ||
| + | vDOLCursorList.Open; | ||
| + | Result := vDOLCursorList; | ||
end; | end; | ||
</source> | </source> | ||
Version actuelle en date du 17 octobre 2011 à 16:38
property Where:string;
Propriété en lecture / écriture.
Cette propriété contient le critère de recherche objet permettant de sélectionner les enregistrements renvoyés.
Exemple :
function getCursor:TCursor; var vDOLCursorList : TCursor; vWhere : String; begin vDOLCursorList := ClassManager.CreateCursor('TDetailOperationLogistique'); vDOLCursorList.Where := '(oidLotProduit = %1) and (oidDepot = %2) and (dateExecution >= %3)'; vDOLCursorList.ArgCount := 3; vDOLCursorList.Args[1] := aOidLotProduit ; vDOLCursorList.Args[2] := aOidDepot ; vDOLCursorList.Args[3] := aDate ; // vDOLCursorList.NOLOCK := TRUE; vDOLCursorList.Open; Result := vDOLCursorList; end;
| Whos here now: Members 0 Guests 0 Bots & Crawlers 1 |