TextFieldType Property


TextFieldType Property

Location

TextFieldParser.TextFieldType

Syntax

     Dim fileParser As FileIO.TextFieldParser     ' ...later...     Dim result As Microsoft.VisualBasic.FileIO.FieldType = _    fileParser.TextFieldType 

or:

 fileParser.TextFieldType = useFieldType 


useFieldType (required; FieldType enumeration)

Indicates the parsing method to be used. One of the following Microsoft.VisualBasic.FileIO.FieldType enumeration values.

Value

Description

Delimited

Retrieves fields that are separated by a delimiter

FixedWidth

Retrieves fields at specific positions and character lengths


Description

The TextFieldType property indicates the method used to retrieve fields from each record in the input file. Set this property before processing the first record of the file.

Usage at a Glance

  • If this property is not set before reading the first record, the object assumes delimited input fields.

  • You must close the TextFieldParser object when finished with it. Use the object's Close method or create the object instance with the Using keyword. See the TextFieldParser Object entry in this chapter for an example.

Related Framework Entries

  • Microsoft.VisualBasic.FileIO.FieldType Enumeration

  • Microsoft.VisualBasic.FileIO.TextFieldParser.TextFieldType Property

See Also

Delimiters Property, FieldWidths Property, ReadFields Method, SetDelimiters Method, SetFieldWidths Method, TextFieldParser Object




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net