fmoore0001
Programmer
Guys, can you use a variable name for a CURSOR in SELECT? I have tried to use the following code:
DO CASE
CASE .og.option1.value = 1
SELECT client_id, trustor_id, status, ;
nam_sort, loan_no ;
FROM trustor ;
WHERE &whatkim ;
ORDER BY loan_no ;
INTO CURSOR &cTimifile
CASE .og.option2.value = 2
SELECT client_id, trustor_id, status, ;
nam_sort, loan_no ;
FROM trustor ;
WHERE &whatkim ;
ORDER BY nam_sort ;
INTO CURSOR &cTimifile
ENDCASE
where cTimifile is a variable set to a Unique file name just for the purposes of a sort. I want to use a unique name as multiple users may be using the same report system.
However, if I SELECT (cTimifile) and Browse thereafter, some other file (the current area) appears. Any idea why this is not working.
Frank
DO CASE
CASE .og.option1.value = 1
SELECT client_id, trustor_id, status, ;
nam_sort, loan_no ;
FROM trustor ;
WHERE &whatkim ;
ORDER BY loan_no ;
INTO CURSOR &cTimifile
CASE .og.option2.value = 2
SELECT client_id, trustor_id, status, ;
nam_sort, loan_no ;
FROM trustor ;
WHERE &whatkim ;
ORDER BY nam_sort ;
INTO CURSOR &cTimifile
ENDCASE
where cTimifile is a variable set to a Unique file name just for the purposes of a sort. I want to use a unique name as multiple users may be using the same report system.
However, if I SELECT (cTimifile) and Browse thereafter, some other file (the current area) appears. Any idea why this is not working.
Frank