|
Home > Archive > FoxPro Help and Support > December 2005 > Date/Time Filter in View
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Date/Time Filter in View
|
|
|
| My connection is to a table in an Oracle 8i db. The table has a column
called DATE1 which is a date/time field type. There are lots of records
with date1 values ranging from 1/1/2000 to 1/1/2005. I'm trying to create a
view of records where date1 is grearter than a user supplied value.
In the command box, I created a variable mval = {^2000-01-10}. I tried to
add a filter Table1.Date1 >= mval. I'm unable to save the view. I keep
getting a dialog "No result set has been returned by the server." and VFP
won't aloow me to save the view. I've tried mval={}, mval ={01/01/200},
mval={^2000-01-01 12:00:00 AM}.
Any ideas?
Thanks in advance,
Jack
| |
| Dan Freeman 2005-12-28, 11:24 am |
| You need to create a parameterized view. Change your filter expression to
table1.date1 >= ?mval
This tells VFP to look for the variable mval whenever the view is opened or
requeried. If the var doesn't exist, VFP will prompt for a value to use.
Dan
jack wrote:
> My connection is to a table in an Oracle 8i db. The table has a
> column called DATE1 which is a date/time field type. There are lots
> of records with date1 values ranging from 1/1/2000 to 1/1/2005. I'm
> trying to create a view of records where date1 is grearter than a
> user supplied value.
>
> In the command box, I created a variable mval = {^2000-01-10}. I
> tried to add a filter Table1.Date1 >= mval. I'm unable to save the
> view. I keep getting a dialog "No result set has been returned by
> the server." and VFP won't aloow me to save the view. I've tried
> mval={}, mval ={01/01/200}, mval={^2000-01-01 12:00:00 AM}.
>
> Any ideas?
>
> Thanks in advance,
>
> Jack
| |
|
| Thanks Dan.
"Dan Freeman" <spam@microsoft.com> wrote in message
news:OWnt328CGHA.1676@TK2MSFTNGP09.phx.gbl...
> You need to create a parameterized view. Change your filter expression to
>
> table1.date1 >= ?mval
>
> This tells VFP to look for the variable mval whenever the view is opened
> or
> requeried. If the var doesn't exist, VFP will prompt for a value to use.
>
> Dan
>
> jack wrote:
>
>
|
|
|
|
|