Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ALTER TABLE error: file c:\temp\0502743.tmp does not exi
Message
From
11/08/2001 16:45:59
Jonathan Cochran
Alion Science and Technology
Maryland, United States
 
 
To
11/08/2001 08:32:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00542442
Message ID:
00542664
Views:
20
I've seen some machines where they didn't exist. Either deleted by the user or something else. Other times, I've seen them point to an invalid location.

I guess I haven't seen this problem with ALTER TABLE, but I have seen it with other areas, such as the VFP ODBC driver and cursors.

>How it is possible that TEMP or TMP is undefined ?
>They are added automatically by Windows!
>
>I use the following routine from UT API section to get temporary folder. This eliminates error if
>set TEMP= placed in autoexec.bat file points to illegal directory.
>I think that VFP uses
>the same API call for default TMPFILES setting . How can environment veriables affect to this process?
>
>
>* return temporary folder name.
>function GetPath
>DECLARE INTEGER GetTempPath IN "kernel32" ;
>		LONG nBufferLength,  ;
>		STRING lpBuffer
>LOCAL lnBufferLength, lcBuffer
>lnBufferLength = 512
>lcBuffer = REPLICATE( " ", lnBufferLength )
>lnReturn = GetTempPath( lnBufferLength, @lcBuffer )
>lcBuffer = STRTRAN( TRIM( lcBuffer ), CHR(0), '' )
>RETURN lcBuffer
>
>
>
>>Whenever I see this, I just go to DOS and type "ATTRIB C:\TEMP -S".
>>
>>Other cases where I have seen this problem is if the TEMP or TMP environment variables aren't defined.
>>
>>>>c:\temp could be marked as a System folder.
>>>>
>>>>I have this problem temporarily, where the Windows temp folder I assigned is not a System folder for a while, then suddenly one day it is. I have no idea why it suddenly is.
>>>
>>>In my case, terminal server was installed. Maybe this causes this problem ?
>>>
>>>How to make temporary file folder back to non-system folder on NT server ?
>>>
>>>>VFP ignores system folders. Cursors are created in memory but have a path assigned, but not necessarily disk presence.
>>>>When a DBF() (usu. w/ APPEND FROM DBF()...) or ALTER TABLE is fired on it, it tries to get it from disk. Since it ignores system folders, the file doesn't exist.
>>>
>>>I checked that
>>>
>>>SELECT ... INTO TABLE c:\TEMP\mytbl
>>>
>>>works OK. Why in this case error does not occur ?
>>>
>>>>You can include a config.fpw file in your exe with a TMPFILES directive to a folder that is definitely not a system file - like a relative path to "myapplicationstempfolder".
>>>
>>>Unfortunately, I cannot re-compile exe file. I don't have exact source code. config.fpw file is included in .exe . I can add some init code to this
>>>.exe file using CodeBlock. However, VFP is unable to change TMPFILES setting in code.
>>>How to resolve this ?
>>>
>>>Also, I have generic appication and idea not using OS temporary folder for temporary files seems strange.
Previous
Reply
Map
View

Click here to load this message in the networking platform