Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ALIAS failing with variable
Message
From
14/07/2003 11:54:27
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
ALIAS failing with variable
Miscellaneous
Thread ID:
00809859
Message ID:
00809859
Views:
66
URGENT. After a recompile last week I have a whole project that is bombing on methods that haven't been changed. In many methods I have a variable or lparameter which holds a file name, then I use the file or select the file using the variable. Possibly I changed an evirnoment setting when I recompiled the project? I know with VFP6 I would have had to assign an alias to make the code below work. But in VFP7, until this morning, I have been able to select the files using the variable.

In the example below the method takes the file passed in, adds some new fields, then overwrites the passed in file with the modified file.
LPARAMETERS tcfile1, tcType, tdDate

SELECT *, ;
            WEEK(dreceived,1,2) AS iWeek, ;
            YEAR(dreceived) AS iYear,  ;
            ((YEAR(dreceived)*100) + ;
            WEEK(dreceived,1,2))AS iYearWeek, ;
            tdDate AS dEndWeek ;
            FROM (tcfile1) ;
            INTO CURSOR xNewFile

USE IN (tcfile1)  ---- Program bombs here with error message "Alias '000HWF9Q' is not found."
                            
SELECT xNewFile
COPY TO (tcfile1)
USE IN xNewFile
Next
Reply
Map
View

Click here to load this message in the networking platform