simonwachira Posted February 21, 2018 Share Posted February 21, 2018 I am trying to read a text file using the code below but it give s me an error : F0001 An unspecified error occurred.: readdelim_test Line 8 - Uncaught error in sequence readdelim_test line no 8 is: simon = file.ReadDelim(FileHandle,-1,",",chr(13),0,0) ***********start of code************************* private simon private FileHandle = file.Open("C:\Users\Simon\Dropbox\KOFC\DAQfactory\write_delim.txt",0,1,0,1) simon = file.ReadDelim(FileHandle,-1,",",chr(13),0,0) (this is line number 8) file.Close(FileHandle) system.MessageBox(simon) *******************end of code****************************** write_delim.txt Link to comment Share on other sites More sharing options...
AzeoTech Posted February 21, 2018 Share Posted February 21, 2018 The problem is that you opened the file with only "Write" attributes, so DAQFactory can't actually do a read. You need to do file.open() with 1,0,0,1 instead of 0,1,0,1. The order goes: Read, Write, Append, Text. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.