TAsciiFile Component

Written by: 	Johan Kotze
		26 Des Pres Street
		De Zoete Inval
		Paarl
		7646
		South Africa

		E-Mail: KKOTZE%BOLAND@MHS.CSTAT.CO.ZA


Disclaimer
This component and source code is freeware, that is you can use it in any way you like. 
You use this component at you own risk. I shall not be liable for any damage that this 
component causes. By using this component or source you accept all responsibility.


Component Overview
The component creates an ascii file (either fixed or CSV) from a datasource. It used field 
definitions to decide which fields to include in the file and how to write them to the file. It 
will only include fields who's visible property is set to true. When creating a fixed ascii file, 
it also uses the aligment and displaywidth properties to format the output.

Component Properties
TAsciiFile has only a few properties, namely:
  DataSource - The datasource to create the ascii file from. Any Delphi datasource 
should work.
  FileName - The name of the output file.
  FileType - Either "Fixed" or "CSV". 
  Headers - A boolean that determines whether the first line in the file contains the field 
names.
  QuoteAll - A boolean value only applicable when FileType is "CSV". This causes all 
fields to be enclosed in double quotes

How to use the component
Set up the datasource you want to convert to ascii. Select the fields you want to appear in 
the ascii file, by setting their visible property to true. Set the displaywidth and alignment 
properties if you export to a fixed ascii file. Drop TAsciiFile on the form. Connect 
TAsciiFile to the datasource, set the headers and Quoteall properties, specify a name for 
the ascii file and call the Execute method. That's all.

Future enhancments
At the moment there is no error checking of any kind. I plan to create an exception class 
and include some error checking. If you have any suggestions of find any bugs I would 
like to hear about it. If you like this component and find it usefull, let me know. I decided 
to release this component as a token of appreciation to all the people who's free 
components I have used in the past.

Johan Kotze
