-
I opened up my folder where my current project is and i noticed a lot of tmp files usually with a VB###.TMP name. I figured since there weren't there before it's alright to delete them. But can anyone explain to me what these files are, and what they are for? Just wondering :D
Also once I compile my project, will it keep making these .TMP files?
-
What TMP Files?
That is very strange. I have never seen tmp files like that. Maybe you are using an addin or control that creates these files. Have you tried opening the files to see what's in them?
Shrog
-
TMP Files are temporary files where temporary information is stored. Sometimes, they are forgotten to be deleted by the programs that use them. It is safe to delete them because if they needed to be used more, they'd be created again.
Also once I compile my project, will it keep making these .TMP files?
Usually, all form information to the project is stored in the .vbp file. If you have a huge file, a tmp file may be used to store other information, but I'd say it is safe to delete them.
-
Yes, but not VB
We all know about temp files, but in all my experience with VB, starting from version 3 all the way to version 6 SP4, I have never seen VB creating temp files in the project's directory.
Shrog
-
When VB first installs, it does. Usually creates them in C:\ or the VB's directory.
-
Just don't care about the TMP files.
Your program will not make the TMP files, only if Windows is running out of memory - and then they'll be made into C:\Temp or C:\Windows\Temp, whatever the directory is.
-
MerryVIP you said that it usually makes one when windows run out of memory, so does that mean my program is a resource hog, or badly written?
If it keeps making these files will the program eventually delete them? or do I have to keep cleaning the directory? I know it's something trivial but it can get annoying.
Also I think it started when I added dataconnections and data reports in my program, could that be the reason?
-
Temp files are created when the data doesn't fit into memory. The files should be deleted when your program closes. Usually they remain when computer crashes.
Your add-ons may be the main reason why the temp files are created. I'm not sure but it's likely. Probably it's the data reports.
-
I and one friend saw VB use .TMP Files to store information when add pictures in a imagelist. The .TMP file is created in the same directory where the icons or pictures are.
-
I just looked to my temp folder. There was a lot of VB*.TMP files. I think because my VB crashes when you least expect and want it...
Anyway, there was data stored
1. About one project, which was originally a VB6 project but I was able to open it in VB4. Later when I was doing something else, VB crashed.
2. Then there was a huge file, included data about my Homepage Constructor which I'm planning sometimes. Probably there because of VB crash. Part of the file looked kinda like the .FRX files (what-so-ever, store images of the project).
Rest of the data seemed like a memory dump (used when I've ran out of real memory).
-
Well I keep cleaning out the directory of the tmp files, and it's getting to be a hassel.
When I come to think about it the computer crashed a few times so may explain the temp files. But there were still times when things went alright and no crashes occured, don't know if the temp files were deleted or not. I have around 20. Is this normal? I'm starting to wonder if my code is sloppy......
-
Delete Them By Code
if it really annoys ya....
then just add a simple code in the form_unload event
in which it deletes all the temp files in the app.path
-
TMP files are also created when you are connecting to a datasource and you don't close all the connections before the application ends. Like if you are working with a recordset and the receive an error and stop your application prematurely. Then the computer can't close all the connections to the datasource and leaves the tmp files either in the directory where your application is or the datasource.
-
Edneeis i think that would be my problem, I don't think I close my connections, my data object I do but never considered closing my connections. How do I close a connection properly? is this code right?
DataEnvironment1.Connection1.Close
or is there a proper way?
If not i'll just do what dealman suggested
I hope this get rid of all of this, there was one time I had like 30 of them!
-
I just add this code to the Unload event:
Code:
For x = 1 To de.Recordsets.Count
If de.Recordsets.Item(x).State <> asStateClosed Then
de.Recordsets.Item(x).Close
End If
Next x