ClimoC
Well-known Member
- Joined
- Aug 21, 2009
- Messages
- 584
Arvo
Thought I'd put this in here rather than the Excel one as the bulk of the code is ADO.
So the system I have setup has a read-only workbook that connects to CSV databases, edits them, and saves them back out again (meaning only one workbook to debug!)
I have researched and been made aware that something to do with synchronicity issues in Win7 (we are on Enterprise) means that sometimes when a document is accessed, a tmp file gets created. People have tried pointing it to antivirus, but we use an in house one, and our network is fairly open (I can youtube, facebook, I can even download **** or viruses - not that I ever would obviously).
The issue: is that sporadically and randomly, when it comes time to save and overwrite the existing file, a ".tmp" file (hidden) remains, but the csv file disappears into the nether. There is no error supplied at the point of the code saving.
I initially attributed the error to people with poorer network connections, and that my original code opened the csv, copied and pasted the data to a spare sheet, at which point it was slurped up into a recordset, and work could begin.
I have since used SQL to create the Recordset directly reading from the csv itself - no 'open'. This dramatically reduced the number of .tmp files being created.
But now they're creeping back in again.
From the timestamp on 'date modified' for the .tmp files that remain when the main csvs go missing, I can see it is when people use the saving function.
Is there a way to write the recordset back to the csv file directly with SQL, much like how I now access the recordset in the first place?
The only thing I can think to do, which I don't like the idea of, is to follow the line that saves out as a csv, with a Loop that refuses to stop and allow you to continue quitting or working until the Scripting.FileSystemObject can detect the ".csv" file in the folder
Any thoughts on this?
Office 2010, Win7 Enterprise
PS if anyone's wondering why I'm not using accdb's or something equivalent, it's because the end users are more comfortable with csv's, so if there's a problem and I'm not around, someone with half a brain and no coding experience can restore/copy information from the csv without corrupting anything
Thought I'd put this in here rather than the Excel one as the bulk of the code is ADO.
So the system I have setup has a read-only workbook that connects to CSV databases, edits them, and saves them back out again (meaning only one workbook to debug!)
I have researched and been made aware that something to do with synchronicity issues in Win7 (we are on Enterprise) means that sometimes when a document is accessed, a tmp file gets created. People have tried pointing it to antivirus, but we use an in house one, and our network is fairly open (I can youtube, facebook, I can even download **** or viruses - not that I ever would obviously).
The issue: is that sporadically and randomly, when it comes time to save and overwrite the existing file, a ".tmp" file (hidden) remains, but the csv file disappears into the nether. There is no error supplied at the point of the code saving.
I initially attributed the error to people with poorer network connections, and that my original code opened the csv, copied and pasted the data to a spare sheet, at which point it was slurped up into a recordset, and work could begin.
I have since used SQL to create the Recordset directly reading from the csv itself - no 'open'. This dramatically reduced the number of .tmp files being created.
But now they're creeping back in again.
From the timestamp on 'date modified' for the .tmp files that remain when the main csvs go missing, I can see it is when people use the saving function.
Is there a way to write the recordset back to the csv file directly with SQL, much like how I now access the recordset in the first place?
The only thing I can think to do, which I don't like the idea of, is to follow the line that saves out as a csv, with a Loop that refuses to stop and allow you to continue quitting or working until the Scripting.FileSystemObject can detect the ".csv" file in the folder
Any thoughts on this?
Office 2010, Win7 Enterprise
PS if anyone's wondering why I'm not using accdb's or something equivalent, it's because the end users are more comfortable with csv's, so if there's a problem and I'm not around, someone with half a brain and no coding experience can restore/copy information from the csv without corrupting anything