If you encounter this error that mean that you are trying to access a file which is not closed at the moment. The file your trying to access is still open, below is the screen-shot:
Solution:
The solution is that you simple need to close the file the TextIO class. For closing the file you neeed to use this syntax:
TextIo inputFile;
;
inputFile.finalize();
// This will close the file and then you can proceed with your remianing operation on the file.
Thanks - this problem was driving me crazy. Great job!
ReplyDeleteThumb up!
ReplyDeleteThis method is private.. and it's driving me crazy now
ReplyDeleteDamn.. I have been struggling the whole day. When generating file on client side file = null works. But when running in a batch need to finalize..
ReplyDelete