Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select - sql command
Message
De
02/02/2002 12:36:20
 
 
À
02/02/2002 11:36:32
Randy Hooper
Ranco Business Software
Tampa, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00614397
Message ID:
00614410
Vues:
21
>I need to gather records from a date field from a range to a range. What I'm trying is not working "where registration.flddate between thisform.text1.value and thisform.text2.value" What wrong with this line of code. I'm getting from vfp "Filter Clear" and "Object is not contained in a form" and all my records are displaying
>
>Thanks Randy

Make your SELECT - SQL command like string and the macrosubstitute it. e.g.:
Local lcSQL
lcSQL = [SELECT * from registration WHERE registration.flddate between ]+ TransformToDate(thisform.text1.value)+[ and ]+TransformToDate(thisform.text2.value)
TransformToDate is your own UDF that makes a given DATE value in appropriate string format for your database (if you use SQL Server it will give some different result than for VFP tables) For that function you may uilize the DATE, DAY, MONTH, YEAR VFP functions.

HTH
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform