Skip to content

TCSVParser.SetSource

Set the CSV source data.

Declaration

Source position: csvreadwrite.pp line 143

public 
procedure SetSource(AStream: TStream);  overload; overload;

procedure SetSource(const AString: string);  overload; overload;

Description

SetSource sets the source of the CSV data to aStream (a stream) or aString (a string). It calls ResetParser to reset the parser state. The stream is by default not owned by the parser, i.e. you must free it after it has been used. If TCSVParser.FreeStream is True, then the stream will be freed by the parser class when it is destroyed, or when a new stream is set.

See also

Name Description
FreeStream Does the parser free the stream when done ?
ResetParser Reset the parser to its initial state.