Bonjour à tous,
Je travaille avec Delphi 2007 et Firebird.
J'essaie de faire un filtre sur une base Firebird contenant un champ datetime (Date_cloture) pour n'obtenir que les enregistrements dont le champ Date_Cloture est vide.
J'ai tenté les trois procédures suivantes :
Les trois me renvoient une vue du fichier sans aucun enregistrement.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 procedure TF_SuiviIncidents.BImpOrdiNonCloturesClick(Sender: TObject); begin With F_Accueil.IBDataSet_Incidents do begin Close; SelectSQL.Clear; SelectSQL.Add('SELECT * FROM ' + xnom_base_incidents); SelectSQL.Add(' WHERE DATE_CLOTURE= :XDATE'); ParamByName('XDATE').AsDateTime := 0; Active; end; procedure TF_SuiviIncidents.BImpOrdiNonCloturesClick(Sender: TObject); begin With F_Accueil.IBDataSet_Incidents do begin Close; SelectSQL.Clear; SelectSQL.Add('SELECT * FROM ' + xnom_base_incidents); SelectSQL.Add(' WHERE DATE_CLOTURE= :XDATE'); ParamByName('XDATE').AsDate := 0; Active; end; procedure TF_SuiviIncidents.BImpOrdiNonCloturesClick(Sender: TObject); begin With F_Accueil.IBDataSet_Incidents do begin Close; SelectSQL.Clear; SelectSQL.Add('SELECT * FROM ' + xnom_base_incidents); SelectSQL.Add(' WHERE DATE_CLOTURE= :XDATE'); ParamByName('XDATE').AsString := ''; Active; end;
Pourriez-vous m'aider ?
Merci d'avance.
Partager