Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datetime and Views
Message
From
06/05/2002 09:55:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
06/05/2002 09:51:26
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00653039
Message ID:
00653040
Views:
17
>Hello,
>
>I have a view pulling data from MSSQL 2000 table. I'm using the filter statement to limit my data. I filter is on a Datetime field with the field property set to date. The filter statement is:
>
>err_datetime = ?lddate
>
>lddate = date()
>requery('viewe')
>
>This returns all records. Any suggestions?
>
>
>Regards,
>
>Steve

I don't know why all records are retrieved, but I would start doing two changes:

1) Change the date value to a datetime value. See dtot().

2) Use two parameters, as a range: err_datetime between ?ltTime1 and ?ltTime2.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform