delete temp files
-
iam developing application that get binary data from the database(.doc)files and iam storing these file in local files while dealling with it and after i finish i call System.IO.File.Delete(myfile); but most of the time the file doesn't delete so if any one know granteed way to delete my temp files
-
iam developing application that get binary data from the database(.doc)files and iam storing these file in local files while dealling with it and after i finish i call System.IO.File.Delete(myfile); but most of the time the file doesn't delete so if any one know granteed way to delete my temp files
Files cannot be deleted while they're kept open. Are you sure that you close all stream which accessed the file, before trying to delete it?
-
Files cannot be deleted while they're kept open. Are you sure that you close all stream which accessed the file, before trying to delete it?
i do not make streams with these files these files r doc files and i have activex control on my form opens these files and when the user exits the application these files must be deleted.
-
i do not make streams with these files these files r doc files and i have activex control on my form opens these files and when the user exits the application these files must be deleted.
Then your ActiveX controls MUST close the files before the app exists. There must be some way of telling the ActiveX control to close it's files. If not, you're going to have to come up with some kind of shell around your entire app that waits for your app to close, then deletes the files... RageInTheMachine9532
-
Then your ActiveX controls MUST close the files before the app exists. There must be some way of telling the ActiveX control to close it's files. If not, you're going to have to come up with some kind of shell around your entire app that waits for your app to close, then deletes the files... RageInTheMachine9532
The ActiveX control would most likely close the file handles while being disposed, so making sure the temp files are deleted after the ActiveX control is disposed would help.
Microsoft MVP, Visual C# My Articles
-
The ActiveX control would most likely close the file handles while being disposed, so making sure the temp files are deleted after the ActiveX control is disposed would help.
Microsoft MVP, Visual C# My Articles
Heath Stewart wrote: The ActiveX control would most likely close the file handles You said it yourself! :) most likely, but not guaranteed... I say this because I've seen some crappy ActiveX controls come out of Novell that didn't clean themselves up properly. RageInTheMachine9532
-
Heath Stewart wrote: The ActiveX control would most likely close the file handles You said it yourself! :) most likely, but not guaranteed... I say this because I've seen some crappy ActiveX controls come out of Novell that didn't clean themselves up properly. RageInTheMachine9532
He seems to be using the Office ActiveX controls which would close the file handles. Like you said, though, there are crappy ones out there that don't. From Novell I don't doubt that!
Microsoft MVP, Visual C# My Articles
-
He seems to be using the Office ActiveX controls which would close the file handles. Like you said, though, there are crappy ones out there that don't. From Novell I don't doubt that!
Microsoft MVP, Visual C# My Articles
Heath Stewart wrote: From Novell I don't doubt that! :laugh: You sound like you speak from experience? RageInTheMachine9532
-
Heath Stewart wrote: From Novell I don't doubt that! :laugh: You sound like you speak from experience? RageInTheMachine9532
With their networking protocols and the like, yes. I just don't like them and with Active Directory and *nix-based networks dominating the market, I can't believe Novell is still around. I guess they think that clinging to open-source will save them. Nothing like jumping on the bandwagon...until it falls off a cliff! Bwahahahaha!
Microsoft MVP, Visual C# My Articles
-
With their networking protocols and the like, yes. I just don't like them and with Active Directory and *nix-based networks dominating the market, I can't believe Novell is still around. I guess they think that clinging to open-source will save them. Nothing like jumping on the bandwagon...until it falls off a cliff! Bwahahahaha!
Microsoft MVP, Visual C# My Articles
On top of all that, it still needs a DOS partition to boot and still relies on 16-bit code in it's kernel. Won't be fixed until NetWare 8 with a complete rewrite of the kernel, if the company survives that long... RageInTheMachine9532