Difference between revisions of "Documentation/DevGuide/Database/The SDBC Driver for Flat File Formats"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Changing Category:Documentation/Developers Guide/Database Access)
m
 
(3 intermediate revisions by 3 users not shown)
Line 7: Line 7:
 
|NextPage=Documentation/DevGuide/Database/The SDBC Driver for OpenOffice.org Calc Files
 
|NextPage=Documentation/DevGuide/Database/The SDBC Driver for OpenOffice.org Calc Files
 
}}
 
}}
{{DISPLAYTITLE:The SDBC Driver for Flat File Formats}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/Database/{{SUBPAGENAME}}}}
This driver is another basic driver available in {{PRODUCTNAME}} 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:
+
{{DISPLAYTITLE:The SDBC Driver for Flat File Formats}}
 +
This driver is another basic driver available in {{AOo}} 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 >
 
   sdbc:flat:<folder or file url >
Line 14: Line 15:
 
For instance:
 
For instance:
  
   sdbc:file:file:///d:/user/database/textbase1
+
   sdbc:flat:file:///d:/user/database/textbase1
  
 
Properties that can be set while creating a new connection.
 
Properties that can be set while creating a new connection.
Line 28: Line 29:
 
* text file format (''*.txt'')
 
* text file format (''*.txt'')
 
|-
 
|-
|<idlm>com.sun.star.sdbc.FILEConnectionProperties:Charset</idlm>  
+
|<idlm>com.sun.star.sdbc.FILEConnectionProperties:CharSet</idlm>  
|<code>string</code> - Converts data from the ODBC driver into the corresponding text encoding. The value must be a value of the list from [http://www.iana.org/assignments/character-sets www.iana.org/assignments/character-sets]. Only some are supported, but a new one can be added.  
+
|<code>string</code> - Converts data from the ODBC driver into the corresponding text encoding. The value must be a value of the list from [https://www.iana.org/assignments/character-sets www.iana.org/assignments/character-sets]. Only some are supported, but a new one can be added.  
 
|-
 
|-
 
|<idlm>com.sun.star.sdbc.FLATConnectionProperties:FixedLength</idlm>  
 
|<idlm>com.sun.star.sdbc.FLATConnectionProperties:FixedLength</idlm>  

Latest revision as of 14:13, 21 December 2020



This driver is another basic driver available in Apache OpenOffice 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:flat: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
In other languages