Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select
Message
 
À
14/07/2005 01:28:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Select
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01032514
Message ID:
01032515
Vues:
20
>hi all,
>could you help me to change this code under to select statment ,
>
>ldStart=MONTH(thisform.text2.Value)
>ldEnd=MONTH(thisform.text25.Value)
>m.a=UPPER(ALLTRIM(thisform.text18.value ))
>m.f=THISFORM.TEXT24.VALUE
>------------------------------
>
>&&&i useto this code to get result for one month only i try to insert another date to get result ,not works&&&
>LOCATE FOR   MONTH(dat)=MONTH(thisform.text2.Value) .and. MONTH(dat)=MONTH(thisform.text25.Value).AND. table1.mac1=UPPER(ALLTRIM(thisform.text18.value )) AND TYP=THISFORM.TEXT24.VALUE
>IF FOUND()
>set filter to   MONTH(dat)=MONTH(thisform.text2.Value) and MONTH(dat)=MONTH(thisform.text25.Value).AND. table1.mac1=UPPER(ALLTRIM(thisform.text18.value )) AND TYP=THISFORM.TEXT24.VALUE
>....
>....
>else
>=messagebox("not found")
>...
>endif
>
>
>thanks.

Try
SELECT * FROM table1;
WHERE MONTH(table1.dat)=MONTH(thisform.text2.Value) and MONTH(table1.dat)=MONTH(thisform.text25.Value).AND. table1.mac1=UPPER(ALLTRIM(thisform.text18.value )) AND table1.TYP=THISFORM.TEXT24.VALUE
INTO CURSOR MyCursor
IF _TALLY > 0
...
...
ELSE
   =messagebox("not found")
ENDIF
But what is this ?
MONTH(dat)=MONTH(thisform.text2.Value)
and
MONTH(dat)=MONTH(thisform.text25.Value)
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform