I use vfp8 and winxp.
This parametric view I have used as a recordsource for a list.
CREATE VIEW v_Sdstud AS ;
SELECT ;
sdstud.st_name AS Athletes, ;
sdstud.st_studid ;
FROM ;
Sdstud ;
WHERE ;
sdstud.st_house = ?choicehouse ;
AND sdstud.st_sex = ?choicesex ;
AND sdstud.st_athlete = .T. ;
AND (Sdstud.st_class = ?choiceclass OR upper(?choiceclass) = 'OPEN') ;
order by ;
sdstud.st_name
It works fine. When I run the form, the list is filled the way it should
with name of students.
Now, on the top of the list of students I would like to add the record '(No
athlete)'.
I have tried this:
CREATE VIEW v_Sdstud AS ;
SELECT ;
sdstud.st_name as Athletes, ;
sdstud.st_studid ;
FROM ;
Sdstud ;
WHERE ;
sdstud.st_house = ?choicehouse ;
AND sdstud.st_sex = ?choicesex ;
AND sdstud.st_athlete = .T. ;
AND (Sdstud.st_class = ?choiceclass OR upper(?choiceclass) = 'OPEN') ;
union ;
SELECT ;
'(No athlete)' as Athletes, ;
0 as st_studid ;
from sdstud ;
order by ;
1
When I browse the query from the data environment and feed it the parameters
it works fine. However, when the form is running it gives me an empty list.
What am I doing wrong?
Is there a better way of doing this?
Sincerely,
Jan Nordgreen