Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro Expansion, and Name Expressions
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00243690
Message ID:
00243751
Views:
23
>I'm like *really* confused about macro expansions and name expressions. I start with the following code:
>
>
>* Grab a couple tempfile names
>
>lcFOrange= SUBSTR(SYS(2015), 3, 10) && taken from VFP help examples
>lcFExpend =SUBSTR(SYS(2015), 3, 10) && temp table name
>lcFCommit =SUBSTR(SYS(2015), 3, 10) && temp table name
>lcFOutput =SUBSTR(SYS(2015), 3, 10) && temp output file
>
>SELECT whatever into table (lcFExpend)
>
>
>This works, fine, but the (lcFExpend) then isn't a "real" alias that can be used to do things like
>
>
>WHERE (lcFExpend).fieldname="myvalue"
>
>

The bviosu solution here is to either use an ALIAS clause to establish a fixed name, or use:

WHERE EVAL(lcFExpend+'.fieldname') = "myvalue"

>I fooled around with all combinations of &lcFExpend and (lcFexpend) and sometimes things seem to work and other times not.
>
>I guess my global question is, how can I use a temporary file name that is randomly generated, for a table name within a program, and then be able to delete the file name. I'd like the name to be random; (it is a multi-user program). And I need to use this the same way I would use a normal table alias.
>
>Thanks.
>
>--- Larry
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform