FILTRAGE MULTIPLE D'UNE BASE DE DONNEES A PLUSIEURS COLONNES AU MÊME TEMPS

fbalien Messages postés 251 Date d'inscription dimanche 7 décembre 2003 Statut Membre Dernière intervention 11 novembre 2016 - 19 févr. 2007 à 09:53
cs_abdenour123 Messages postés 17 Date d'inscription lundi 21 janvier 2008 Statut Membre Dernière intervention 29 mai 2009 - 29 mai 2009 à 12:58
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/41531-filtrage-multiple-d-une-base-de-donnees-a-plusieurs-colonnes-au-meme-temps

cs_abdenour123 Messages postés 17 Date d'inscription lundi 21 janvier 2008 Statut Membre Dernière intervention 29 mai 2009
29 mai 2009 à 12:58
with ADOQuery1 do
begin//*
SChamps:=suiComboBox2.Text;
Active:=false;
SQL.Text:='Select * From Client'+' where '+
SChamps+'Like"%'+FiltreValeur.Text+'%"'+'
and Nom Like"%'+Edit1.Text+'%"' ;
and ...
and....
and....
ADOQuery1.Open;
en 2 ligne.
kimlion1 Messages postés 7 Date d'inscription mardi 9 septembre 2008 Statut Membre Dernière intervention 9 janvier 2009
9 janv. 2009 à 12:25
merci pour votre effort, il y a des gens comme moi qui n'ont jamais posé quoi que ce soit.
bonne continuation
kamel
gigabyte Messages postés 21 Date d'inscription vendredi 19 janvier 2007 Statut Membre Dernière intervention 18 octobre 2015
19 oct. 2008 à 21:39
il est bien ,en parallel il est un ptt long.merci qmm.continu.
jackalunion Messages postés 128 Date d'inscription mercredi 8 janvier 2003 Statut Membre Dernière intervention 14 juillet 2008
24 juin 2008 à 04:25
trés long
HAFTARIFOUAD Messages postés 256 Date d'inscription mercredi 5 septembre 2007 Statut Membre Dernière intervention 6 janvier 2011
20 déc. 2007 à 13:02
Bonjour;
ben c du bon travail...
je vous invite de voir mes sources déposées sur le site, vous aller découvrir l'importance de language SQL dans les options filtre et le Tri

bon courage et bonne chance. ;-)
toufik_tfk Messages postés 3 Date d'inscription mardi 26 juin 2007 Statut Membre Dernière intervention 27 juin 2007
27 juin 2007 à 15:07
Merci monsieu mihoubi
rabi yahafdek
frsof Messages postés 18 Date d'inscription mardi 7 septembre 2004 Statut Membre Dernière intervention 3 décembre 2008
21 févr. 2007 à 20:59
Tu a fait un grand effort, tous ce programme que tu peu le resume tous simplement dans une petit requete avec sql
yvessimon Messages postés 637 Date d'inscription mardi 22 avril 2003 Statut Membre Dernière intervention 9 janvier 2017
19 févr. 2007 à 10:05
Bonjour,

Regarde avec le langage SQL

Avec DBGrid il est possible de filtrer par ordre alphabétique.

Salutations
fbalien Messages postés 251 Date d'inscription dimanche 7 décembre 2003 Statut Membre Dernière intervention 11 novembre 2016
19 févr. 2007 à 09:56
même chose pour les autre tests pour 3 2 et 1 champ
fbalien Messages postés 251 Date d'inscription dimanche 7 décembre 2003 Statut Membre Dernière intervention 11 novembre 2016
19 févr. 2007 à 09:53
Bonjour

toute cette partie
//******************************************
# if e4='' then if e1='' then if e2='' then if e3='' then T.Filtered:=false;
# if e4='' then if e1='' then if e3='' then if e2='' then T.Filtered:=false;
# if e4='' then if e2='' then if e1='' then if e3='' then T.Filtered:=false;
# if e4='' then if e2='' then if e3='' then if e1='' then T.Filtered:=false;
# if e4='' then if e3='' then if e1='' then if e2='' then T.Filtered:=false;
# if e4='' then if e3='' then if e2='' then if e1='' then T.Filtered:=false;
# if e1='' then if e4='' then if e2='' then if e3='' then T.Filtered:=false;
# if e1='' then if e4='' then if e3='' then if e2='' then T.Filtered:=false;
# if e1='' then if e2='' then if e4='' then if e3='' then T.Filtered:=false;
# if e1='' then if e2='' then if e3='' then if e4='' then T.Filtered:=false;
# if e1='' then if e3='' then if e4='' then if e2='' then T.Filtered:=false;
# if e1='' then if e3='' then if e2='' then if e4='' then T.Filtered:=false;
# if e2='' then if e1='' then if e4='' then if e3='' then T.Filtered:=false;
# if e2='' then if e1='' then if e3='' then if e4='' then T.Filtered:=false;
# if e2='' then if e4='' then if e1='' then if e3='' then T.Filtered:=false;
# if e2='' then if e4='' then if e3='' then if e1='' then T.Filtered:=false;
# if e2='' then if e3='' then if e1='' then if e4='' then T.Filtered:=false;
# if e2='' then if e3='' then if e4='' then if e1='' then T.Filtered:=false;
# if e3='' then if e1='' then if e2='' then if e4='' then T.Filtered:=false;
# if e3='' then if e1='' then if e4='' then if e2='' then T.Filtered:=false;
# if e3='' then if e2='' then if e1='' then if e4='' then T.Filtered:=false;
# if e3='' then if e2='' then if e4='' then if e1='' then T.Filtered:=false;
# if e3='' then if e4='' then if e1='' then if e2='' then T.Filtered:=false;
# if e3='' then if e4='' then if e2='' then if e1='' then T.Filtered:=false;
// *******************************

devrait pouvoir ce simplifer comme ceci

T.Filtered :=not( (e1='') and (e2='') and (e3='') and (e4=''))
Rejoignez-nous