Job Queue error: The operating system cannot find the drive
dulaman
Member Posts: 73
Hi,
I am facing a strange issue with NAS and Job Queue.
I needed to create a file each morning so I created a Codeunit that makes the hard work. In a given moment, the codeunit is calling a report that will actually create the file xxx.txt in a folder C:\TEMP\
Everything goes well and running smooth when I run the codeunit manually: Alt+R from the Object Designer.
But when I put that same codeunit in the Job Queue, I get this error:
I am very puzzled. What I am doing wrong?? ](*,)
I am facing a strange issue with NAS and Job Queue.
I needed to create a file each morning so I created a Codeunit that makes the hard work. In a given moment, the codeunit is calling a report that will actually create the file xxx.txt in a folder C:\TEMP\
Everything goes well and running smooth when I run the codeunit manually: Alt+R from the Object Designer.
But when I put that same codeunit in the Job Queue, I get this error:
The operating system cannot find the drive and directory specified for the file C:\TEMP\xxx.txt .
Please check that the drive, directory and file names are correct.
I am very puzzled. What I am doing wrong?? ](*,)
-- dulaman
"I don't want to believe. I want to know." (Carl Sagan)
"I don't want to believe. I want to know." (Carl Sagan)
0
Answers
-
The codeunit is run on the computer that runs the jobqueue. Has that computer subdirectory c:\temp?
BTW: You would better use : ENVIRON('temp') to know which is the temp directory on any computer.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
You may also want to check the security context which the Job Queue is running under. There should be user assigned as the login user for the NAS which is running the Job Queue. That user will have to have permissions to read and write to the C:\TEMP on the machine in addition to the folder existing.0
-
I've experienced something weird like that in the past. I didn't know how to fix it but I figured out how to get around it.
I get around that by putting a dummy file in the subdirectory. For example:
X:\Temp\dummy.txt [X:\ is a Network Drive]
Then before I write to the Temp folder, I would first check if the file dummy.txt in that directory exist, if it is then it is a good Path, then I write my output file to that directory.
Files."Is a file"
or
FILE.EXISTS(FileName)
I don't know if you have the same scenario, but I hope this will help.
NIEM THAI0 -
There is also a "Folders" virtual table (I think that's the table name)....it's one of the high range virtual tables that are part of base NAV. That should also give you a mechanism to check if a folder is there.0
-
Hello everybody,
Thank you VERY MUCH for your answers, they were really useful and helped me to solve the issue as they forced me to review everything from scratch.
I was pointing to a wrong computer in the network! :oops: In that computer the folder C:\TEMP didn't existed... :oops:
As far as I created the folder in the right computer, everything went well. \:D/
Thank you again for your help, guys!!-- dulaman
"I don't want to believe. I want to know." (Carl Sagan)0 -
You'd better use ENVIRON('temp') instead of hardcoding "c:\temp".Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanks Kriki for the tip, but in this case C:\TEMP\ was only an example, I was not actually using that folder.
-- dulaman
"I don't want to believe. I want to know." (Carl Sagan)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions