Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ALIAS failing with variable
Message
 
 
To
14/07/2003 11:54:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00809859
Message ID:
00809863
Views:
19
This message has been marked as the solution to the initial question of the thread.
Hi Margaret,

An alias in FoxPro cannot start with digit but your table name starts with one. When FoxPro opens table with name that starts with a digit, it assigns some alias to it (usualy "W" plus the number of work area). Make sure that when you generate temp file name, that it starts with a letter or "_" (underscore).

>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
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform