Hi All,
I am looking for your expert comments.
The task is to read a table and create a .csv file containing records from the table.
The method I am using is:
declare a container;
in while loop, populate container and write to file
while select table1
{
// Empty the container
con = connull();
con = conins(con, 1, table1.Field1);
con = conins(con, 2, table1.Field2);
con = conins(con, 3, table1.Field3);
// Write the container to the file
file.writeExp(con);
}
My question is, is this the efficient way to create a .csv file?
the file.writeExp() is called for every single row in the table. Is there a way to write data all at once? Can you please comment on the efficient method to write to file.