The SDBC Driver for Flat File Formats

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 12:37, 15 February 2008 by Ccornell (talk | contribs) (1 revision(s))
Jump to: navigation, search



This driver is another basic driver available in OpenOffice.org API. It can only be used to fetch data from existing text files, and no modifications are allowed, that is, the whole connection is read-only. The URL for this driver is:

 sdbc:flat:<folder or file url >

For instance:

 sdbc:file:file:///d:/user/database/textbase1

Properties that can be set while creating a new connection.

Properties of com.sun.star.sdbc.FLATConnectionProperties
Extension string - Flat file formats are formats such as:
  • comma separated values format (*.csv)
  • sdf format (*.sdf)
  • text file format (*.txt)
Charset string - Converts data from the ODBC driver into the corresponding text encoding. The value must be a value of the list from www.iana.org/assignments/character-sets. Only some are supported, but a new one can be added.
FixedLength boolean - If true, all occurrences of "?" as a parameter name will be replaced by a valid parameter name. This is necessary, because some drivers mix the order of the parameters.
HeaderLine boolean - If true, the first line is used for column generation.
FieldDelimiter string - Defines a character which should be used to separate fields and columns.
StringDelimiter string - Character to identify strings.
DecimalDelimiter string - Character to identify decimal values.
ThousandDelimiter string - Character to identify the thousand separator. Must be different from DecimalDelimiter.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools