Append record to existing file using dataport

atarisataris Member Posts: 109
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

Comments

Sign In or Register to comment.