Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to capture Sharing Violation error
Message
De
03/06/1998 23:22:56
 
 
À
31/05/1998 08:22:54
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00099769
Message ID:
00104560
Vues:
26
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform