General information
Category:
Coding, syntax & commands
>For tmpfiles directory, there's an easy shortcut: Somewhere at startup of the app, I issue a thing like this:
>
>public _work
>create curs dummy (c l)
>_work=addbs(justpath(dbf()))
>use
>
>Then, later in the app, anywhere I need a temp filename, I use tempfilename=_work+sys(3). I don't give it an extension, because it may want to be an index, .dbf or whatever, so it'll get one when it needs one. Most of the time I actually hardcode it as
>Public _work
>_work="C:\Scratch\"
>though I know I should be using the full approach - but then, I take care every machine has the C:\Scratch\ directory.
>
>The reason why the other scenario might not work always is that it may not really create a .tmp file for the cursor, but use a filtered view instead. Worked for me practically always, probably because my SQL's were not straightforward and almost always had some added fields, so I don't remember ever getting a filtered view in FPD instead of a real-file-on-the-disk cursor. You may try adding a dummy field to your SQL selects where the other scenario doesn't work.
Dragan,
You certainly know a couple of good FPD tricks. I will try it. Thanks.
Alex
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only