Topic: SaveToTextFile

The export to csv seems to be adding the id at the end of the output line.

Therefore, I get ID twice.  Once where I explicitly request it and then as the last item.  Is this by design?
Can it be suppresed?  I am using the 2.5 beta version.

Example output

1,Amazon,http://www.amazon.com,,888-555-1212,,,,support@amazon.com,1
2,APMEX,http://www.apmex.com,P.O. Box 269073,866-555-1212,Oklahoma City,OK,73126-9073,support@apmex.com,2

Here is my dbsql

select id, Name, URL, Address, Phone, City, State, Zip, Email from vendor

Thank you,
  Robb

Re: SaveToTextFile

Yes, this is by design, a TableGrid have invisible column.


If you use button with action "SQL Query", you can create an event OnAfterClick, where you will remove the last column with id then call SaveToTextFile procedure, example:

procedure Form1_Button1_OnAfterClick (Sender: string);
begin
    Form1.TableGrid1.Columns[Form1.TableGrid1.Columns.Count-1].Free; // destroy the latest invisible column
    Form1.TableGrid1.SaveToTextFile('d:\1.csv'); // export
end;
Dmitry.