Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select - sql command
Message
From
02/02/2002 12:36:20
 
 
To
02/02/2002 11:36:32
Randy Hooper
Ranco Business Software
Tampa, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00614397
Message ID:
00614410
Views:
20
>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!

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform