davisonpro
Programmer
I have some very old code that has always used a "double macro" substitution for creating temporary files.
Now, in VFP9, I'm getting very different results from the same code that's been around for ages.
There's a lot of this but most all of it looks like this:
** Establish blank temporary data file
COPY STRUCTURE TO &m0datadr.&m0tmpf1..dbf
USE &m0datadr.&m0tmpf1..dbf ALIAS temp_h EXCLUSIVE
(yes I know this is a rotten way to do it but I've inherited this code and there are more than 1,000 instances like this in a very large, fragile, and poorly documented system)
Now, here are 3 different results I get (there may be more):
1) stand-alone PC (XP and up) - it works fine; substitutes the variable name and creates the file and works
2) on a network file server (Windows and Linux), it creates a file named &m0tmpf1..dbf - literally! That is the name so, it cannot work for a subsequent user
3) in the VFP9 development environment, I get very mixed results regardless of where the data is being housed. Usually, it runs with no problem and does what it always did. But, compiled as an EXE...big problems. Inconsistent.
Anybody seen this before? I'm looking for an environmental solution if there is one. Yes, I will re-write the code but that will take months in this system and we're at crunch-time.
This was most unexpected and unwelcome.
Thanks!
Al
Now, in VFP9, I'm getting very different results from the same code that's been around for ages.
There's a lot of this but most all of it looks like this:
** Establish blank temporary data file
COPY STRUCTURE TO &m0datadr.&m0tmpf1..dbf
USE &m0datadr.&m0tmpf1..dbf ALIAS temp_h EXCLUSIVE
(yes I know this is a rotten way to do it but I've inherited this code and there are more than 1,000 instances like this in a very large, fragile, and poorly documented system)
Now, here are 3 different results I get (there may be more):
1) stand-alone PC (XP and up) - it works fine; substitutes the variable name and creates the file and works
2) on a network file server (Windows and Linux), it creates a file named &m0tmpf1..dbf - literally! That is the name so, it cannot work for a subsequent user
3) in the VFP9 development environment, I get very mixed results regardless of where the data is being housed. Usually, it runs with no problem and does what it always did. But, compiled as an EXE...big problems. Inconsistent.
Anybody seen this before? I'm looking for an environmental solution if there is one. Yes, I will re-write the code but that will take months in this system and we're at crunch-time.
This was most unexpected and unwelcome.
Thanks!
Al