Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Internet Explorer Control keeps files open
Message
De
17/09/2004 10:54:54
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
17/09/2004 05:01:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00943237
Message ID:
00943390
Vues:
16
>We just built a file viewer user IE control and it works fine, except for a ennoying problem. The files are PDF or DOC and show normally in the control, but once a file has been displayed, it can't be deleted or renamed or moved. It seems there is a handle that keeps them open until we close the application. We made sure that the files are not displayed in the control before we try to move or delete them, but even after we close VFP, it takes 15 to 30 seconds before we can get access to them and delete them.
>
>Here is the code we use:
>
>
>...
>oIE.navigate(lcFile)
>
>... or
>oIE.navigate2(lcFile)
>...
>
>
>
>Does anyone know this problem?

What I did was to name the files temp001.html, temp002.html etc, from form.cHtmlFilename_access method, giving them new filenames each time the user clicks a link inside the one viewed at the moment. When user requests a fresh document (from another page on the pageframe, not from a link within one of the documents in the existing chain), I'd start over from 001.

But then, that was specific for my situation - single user, multiple files but a limited number of those.

Generally, whenever I had to deal with problem of such files hanging around, I'd put them all in a single directory, somewhere within the app's tree, and on shutdown I'd delete any such file older than 48 hours. This works for various tmp files left behind by stuck workstations (well, once upon a time they used to be on the file server), temp tables, text files etc. In many cases there were reasons why a file can't be deleted immediately, and I've found the 48 hour limit to be a good rule-of-thumb figure.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform