Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing text files from TTables or DBgrids ?

Status
Not open for further replies.

RonR51

Programmer
Apr 19, 2001
18
AU
What is the neatest way of writing the contents of a TTable or DBgrid out to a text file. I need to be able to specify either comma separated or tab separated values. I want the first line to be the field headings and then one line per record with each field separated by the delimiter. I also want to be able to nominate which fields I export, but I can always just create a temporary sub table for that.

I notice that there is a SaveToFile method for DBgridColumns, but I haven't worked out if that will do it for me.

I haven't done much text I/O since the days of the old text file routines. I take that things like filestreams should make it a bit easier.

Thanks for all the help on my earlier posts, they are really appreciated.

RonR51
 
RonR51
If you do not get any help on this let me know and I will email you the code I use
Slim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top