Hi All,
Been a few years since using the forum ...
I need to export information into a csv file and send this to a FTP site. I created a dataport to export the records fine and whenever they want to send more information the file gets replaced with the new records. I would like to open up the existing file though and append new records if the file has not been transfered to the FTP site. Looking at the site I came across some code to do this in a report and I have tested this and it works fine. For interest sake I want to know if this can be done with dataport.
My problem is when I try it with a dataport is it needs a filename for it run, and I can't seem to tell the dataport not to replace the file but to open up the existing one and then write in some code to append the information. I tried to trick it by inserting a file into the file name in order for it to start running some code which will open up the existing file but this didn't. Has anyone done this before or is the report the way to go.
Only problem is you have to build up the csv script yourself which isn't an issue but it would be better through dataport if it is possible.
Cheers everyone
John
0
Comments
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
EXISTS
OPEN
LEN
SEEK
TEXTMODE
and
WRITE
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
I understand you got those methods which checks if one exists or needs to be created but the problme exists right in the beginning when you need to supply the file path.
Then again I don't think it's even the second best way..you have XML and code units.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Anywho all ok