Bonjour,
je souhait connaitre le nombre de ligne que me retourne ma requête (faite par un composant TMyQuery) après exécution.
Pour cela j'ai fait le code suivant.
Mais je ne sais pas pourquoi, je ne passe jamais mon If, RecordCount valant tous le temps zéro, alors que ma requête s'effectue correctement.Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 procedure TFormNewArea.MyQueryChannelAfterExecute(Sender: TObject; Result: Boolean); var indice : integer; begin inherited; indice := 0; if MyQueryChannel.RecordCount <> 0 then begin while not EOF do begin indice := indice + 1; AdvStringGrid1.Cells[indice,1] := MyQueryChannel.Fields[0].Value; Next; end; end; end;
Un indice ?
Merci