chpicker
Programmer
- Apr 10, 2001
- 1,316
*BANGS HEAD ON WALL*
Can anyone explain what the &%$& VFP is thinking here? The other sad part, of course, is that it was NOT doing this yesterday...
I created a view to a table using the View Designer (not the Wizard). I created a variable called Timerange in the dev environment. I then created a filter condition on a datetime field that was worded like this:
timefield BETWEEN datetime()-m.Timerange,datetime()+m.timerange
This worked yesterday...today, however, I get an Operator/Operand Type Mismatch when I try to save the query. I look at the SQL code it generated and here is the WHERE clause it generated:
WHERE table.timefield BETWEEN "DATETIME()-M.timerange" AND CTOD("DATETIME()+M.timerange"
;
WTF!? Ok, no problem...I go to the Filter tab, get rid of the quotes and the CTOD function, and re-save it...and it puts them back! The ONLY way I've managed to get around this is to DELETE the View and re-create it. However...I am NOT able to make any changes to it, because it KEEPS DOING THIS! Every time I want to make changes I have to delete and re-create, otherwise it does the stupidity you see above. Any clues as to why?
Can anyone explain what the &%$& VFP is thinking here? The other sad part, of course, is that it was NOT doing this yesterday...
I created a view to a table using the View Designer (not the Wizard). I created a variable called Timerange in the dev environment. I then created a filter condition on a datetime field that was worded like this:
timefield BETWEEN datetime()-m.Timerange,datetime()+m.timerange
This worked yesterday...today, however, I get an Operator/Operand Type Mismatch when I try to save the query. I look at the SQL code it generated and here is the WHERE clause it generated:
WHERE table.timefield BETWEEN "DATETIME()-M.timerange" AND CTOD("DATETIME()+M.timerange"
WTF!? Ok, no problem...I go to the Filter tab, get rid of the quotes and the CTOD function, and re-save it...and it puts them back! The ONLY way I've managed to get around this is to DELETE the View and re-create it. However...I am NOT able to make any changes to it, because it KEEPS DOING THIS! Every time I want to make changes I have to delete and re-create, otherwise it does the stupidity you see above. Any clues as to why?