LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Opening .txt files created by Labview with MS ACCESS

I am writing data into .txt files with Labview software. I then import these same .txt files into a MS ACCESS 2000 database. I have found that I can not open the .txt files with MS ACCESS unless I close the current session of Labview. After that I can open the file with MS ACCESS at will. How can I add code in Labview that will "release" control of the .txt file so MS ACCESS can read it while Labview continues to run? I can open these same files with notepad etc. whenever I want so there is something else going on that is peculiar to MS ACCESS.
0 Kudos
Message 1 of 3
(2,917 Views)
You don't specify how you're writing to the file, but this problem can occur
if you open the file and then keep it open so you can write data as it comes
in without the overhead of opening the file each time. When you use the
"Open File" function there is a "Deny Mode" input which defaults to letting
other applications read and write to the file while Labview has the file
open. If you have set this otherwise, there may be the problem. Otherwise,
try explicitly closing the file before reading it with Access.

dvorak1964 wrote in message
news:506500000008000000812A0000-999158726000@exchange.ni.com...
> I am writing data into .txt files with Labview software. I then
> import these same .txt files into a MS ACCESS 2000 database. I have
> found that I can
not open the .txt files with MS ACCESS unless I close
> the current session of Labview. After that I can open the file with
> MS ACCESS at will. How can I add code in Labview that will "release"
> control of the .txt file so MS ACCESS can read it while Labview
> continues to run? I can open these same files with notepad etc.
> whenever I want so there is something else going on that is peculiar
> to MS ACCESS.
0 Kudos
Message 2 of 3
(2,917 Views)
I am using the "write to spreadsheet file vi" and "write characters to file vi". Both of these vi's supposedly close the file when they are done.
0 Kudos
Message 3 of 3
(2,917 Views)