I am having a trouble with the following piece of code run from a codeunit:
FileName := 'C:\SomeFile.txt'; ok := UPLOADINTOSTREAM('','<TEMP>','Text Files (*.txt)|*.txt',FileName,NVInStream); IF ok THEN BEGIN BLOBRef.Blob.CREATEOUTSTREAM(NVOutStream); COPYSTREAM(NVOutStream,NVInStream); EXIT(FileName); END; ErrorMessage := GETLASTERRORTEXT; IF ErrorMessage <> '' THEN ERROR(ErrorMessage); EXIT('');
I am always getting the following error message:
Could not find a part of the path 'C:\Users\xxx\AppData\Local\Temp\Microsoft Dynamics NAV\8636\SomeFile.txt'.
I verified, the file ‘C:\Users\xxx\AppData\Local\Temp\Microsoft Dynamics NAV’ does not exist.
How shall I proceed?
Did you get an answer to your question? Did it help you? The members and moderators here on DUG use our spare time and help you for free, all we ask in return is that you spent a few seconds to let us know if we helped you solve your problem.
If any of the suggestions helped you solve your question/problem, then please click the “Verify Solution” on the answer that helped you, so that we can see that your problem is now “resolved”. Otherwise let us know how if there is something else you like to know.