i need this to write to the next line instead of overwriting the previous line until all that is left is the last line of this table in a text file:
Catalog.GET(CatalogCode);
CatalogFile.TEXTMODE := TRUE;
CatalogFile.WRITE( '"' + Catalog.Code +'"' + ',' +
'"' + Catalog.Name +'"' + ',' +
'"' + Catalog."Season Code" + '"');
currently the text in the file looks like this:
"3","3","3"
it needs to look like this:
"1","1","1"
"2","2","2"
"3","3","3"
thanks,
Trint
0
Comments
I didn't know if you created the file at once (=first scenario), or if you just had to add a new line to an allready existing file (=second scenario). I tested both, and approved. My guess is the 'SEEK' is what you were looking for ...
Enjoyed!
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
Is this what u looking for
outFile.OPEN('c:\abc.txt');
outFile.CREATEOUTSTREAM(oStream);
IF Cust.FIND('-') THEN
REPEAT
oStream.WRITETEXT('"');
oStream.WRITETEXT(Cust."No.");
oStream.WRITETEXT('"');
oStream.WRITETEXT(',');
oStream.WRITETEXT('"');
oStream.WRITETEXT(Cust.Name);
oStream.WRITETEXT('"');
oStream.WRITETEXT;
UNTIL Cust.NEXT=0;
outFile.CLOSE;