The Windows file deletation is ok, but the Navision - Windows interaction is
not on all terms "state-of-the-art."
The precaution stated above comes from experience, not from prejudice.
Our customers have imported hundreds of dataport files. Every once in a while, the file deletion did not work, where WHILE-DO wasn't used, for no apparent reason. Better play it safe, this will save you time and money correcting the nasty impacts of double imports.
No problems here, just a little fun at your expense :whistle:. Didn't mean to get your panties in a bunch, and I am sorry if I did. Your (and everybody else's) help is greatly appreciated, trust me.
There was a national holiday yesterday here so I couldn't take part in the chatting , but specially if the import file is on a network drive I would prefer :
CurrFile.CLOSE;
IF Confirm(Text000, true) then
WHILE EXISTS(CurrDataport.FILENAME)
DO ERASE(CurrDataport.FILENAME);
Comments
WHILE EXISTS((CurrDataport.FILENAME)
DO ERASE(CurrDataport.FILENAME);
The WHILE -DO Statement is safer than IF-THEN.
you don't trust Windows too much
Documentation for Microsoft Navision
E/R diagrams, Workflow diagrams, UML diagrams, process diagrams
not on all terms "state-of-the-art."
The precaution stated above comes from experience, not from prejudice.
Our customers have imported hundreds of dataport files. Every once in a while, the file deletion did not work, where WHILE-DO wasn't used, for no apparent reason. Better play it safe, this will save you time and money correcting the nasty impacts of double imports.
I get the Error Message:
You cannot use the file Z:\ABC.txt because it's already in use.
What I'm shooting for is a pop-up that says - Import Completed would you like to delete the file Y/N.
http://www.BiloBeauty.com
http://www.autismspeaks.org
CurrFile.CLOSE;
ERASE(CurrDataport.FILENAME);
Gotta Close the file first.
I didn't start the thread so I cannot add [Solved] :roll:
http://www.BiloBeauty.com
http://www.autismspeaks.org
And of course you need to add the
Where Text000 = 'Would you like to delete the file?'
Succes.
Nobody else has a chance
http://www.BiloBeauty.com
http://www.autismspeaks.org
RIS Plus, LLC
RIS Plus, LLC
If you have any problems, please let me know. Preferably by email, or pm.
RIS Plus, LLC
It was all light hearted, sorry if you took it wrong O:)
http://www.BiloBeauty.com
http://www.autismspeaks.org
RIS Plus, LLC
[Solved]
Put the following Code in the OnPost Dataport Trigger
CurrFile.CLOSE;
IF Confirm(Text000, true) then
ERASE(CurrDataport.FILENAME);
Where Text000 = 'Would you like to delete the file?'
Thanks to all \:D/
http://www.BiloBeauty.com
http://www.autismspeaks.org
RIS Plus, LLC
CurrFile.CLOSE;
IF Confirm(Text000, true) then
WHILE EXISTS(CurrDataport.FILENAME)
DO ERASE(CurrDataport.FILENAME);