Hello experts, I am creating a file from sql with a SP, once created this file I have to add a row to the file.
Was reading and I add the line, the problem is that no moves the lines that were already, the writes on.
The code that use is the following
IF EXISTS(Path + 'Compel_stg.csv') THEN
BEGIN
g_fileCompel.TEXTMODE := TRUE;
g_fileCompel.WRITEMODE := TRUE;
IF (g_fileCompel.OPEN(Path + 'Compel_stg.csv')) THEN
BEGIN
g_fileCompel.CREATEOUTSTREAM(oStream);
oStream.WRITETEXT('Date,SalesCode,SalesTeam,RevenueCategory,RevenueType,Amount,');
oStream.WRITETEXT('order_date,order_no,invoice_no,year,quarter,month,salesrep,ori_salesteam,');
oStream.WRITETEXT('region,enduser_name,enduser_state,enduser_zipcode,area_code,item_code,item_desc,number_of_users,');
oStream.WRITETEXT('product_code,order_type_code,sales_type_code,reseller_name,dist_name,account_id,channel_type,');
oStream.WRITETEXT('order_source,gl_account_no,product_group_code,license_start_date,license_end_date,prod_start_date,');
oStream.WRITETEXT('prod_end_date,TransCode');
oStream.WRITETEXT();
g_fileCompel.CLOSE();
already proven of everything and is not that passes, someone known as I can fix this, since thanks
best regards.
Hugo
0
Comments
http://www.BiloBeauty.com
http://www.autismspeaks.org
some other idea?
best regard
http://www.BiloBeauty.com
http://www.autismspeaks.org
In regard to the function to copy, exist? I do not know any,
read in Navision and not find any you copy files. the other that remains is to generate a new file add the headers and then read from a file I have insert in the other. but it is not very efficient.
Cheers!
Best Regards