Difference between revisions of "lazdbexport"
Line 1: | Line 1: | ||
'''lazdbexport''' is a package that supplies components to facilitate database export. It is delivered with lazarus and may be installed by using [Package|Install/Uninstall packages]. After install the components are accessible via the [[Data Export tab]]. | '''lazdbexport''' is a package that supplies components to facilitate database export. It is delivered with lazarus and may be installed by using [Package|Install/Uninstall packages]. After install the components are accessible via the [[Data Export tab]]. | ||
+ | It provides a template class for descendants that can provide export of datasets. | ||
+ | Also included are various ready-made descendants for: | ||
{| class="wikitext sortable" | {| class="wikitext sortable" | ||
Line 17: | Line 19: | ||
| [[TSimpleJSONExporter]] || || json | | [[TSimpleJSONExporter]] || || json | ||
|- | |- | ||
− | | [[TFPDbfExport]] || || dbf | + | | [[fpdbfexport|TFPDbfExport]] || || dbf |
|- | |- | ||
| [[TTeXExporter]] || || TeX | | [[TTeXExporter]] || || TeX | ||
Line 25: | Line 27: | ||
| [[TStandardExportFormats]] || || | | [[TStandardExportFormats]] || || | ||
|- | |- | ||
− | | [[TFPDataExporter]] || || | + | | [[fpXMLXSDExport|TFPDataExporter]] || || |
|} | |} | ||
+ | |||
+ | As indicated, developers can write their own export classes using the export framework. An example of this is the Excel/spreadsheet format exporter in [[FPSpreadsheet#Dataset export |FPSpreadsheet]] | ||
+ | |||
+ | == Import == | ||
+ | There is no corresponding import to dataset code in FPC/Lazarus, but there is third party code like dbimport (https://bitbucket.org/reiniero/smalltools/src, directory dbimport). | ||
+ | |||
+ | DbImport is used in the [http://lazsqlx.wordpress.com/ LazSQLX] and [http://code.sd/products/turbobird/ TurboBird] database management tools for importing CSV (like) data into datasets. | ||
+ | |||
+ | == Example == | ||
+ | See the examples in your FPC source directory $(fpcdir)\source\packages\fcl-db\tests (see [[Databases#Running_FPC_database_tests]]), specifically testdbexport.pas. | ||
[[Category:Databases]] | [[Category:Databases]] | ||
+ | [[Category:FPC]] | ||
+ | [[Category:Lazarus]] | ||
+ | [[Category:Packages]] | ||
+ | [[Category:Data import and export]] |
Revision as of 20:38, 4 September 2016
lazdbexport is a package that supplies components to facilitate database export. It is delivered with lazarus and may be installed by using [Package|Install/Uninstall packages]. After install the components are accessible via the Data Export tab. It provides a template class for descendants that can provide export of datasets. Also included are various ready-made descendants for:
component | Description | |
TCSVExporter | CSV | |
TFixedlengthExporter | Fixed length | |
TSQLExporter | SQL | |
TXMLXSDExporter | XML/XSD | |
TSimpleXMLExporter | XML | |
TSimpleJSONExporter | json | |
TFPDbfExport | dbf | |
TTeXExporter | TeX | |
TRTFExporter | RTF | |
TStandardExportFormats | ||
TFPDataExporter |
As indicated, developers can write their own export classes using the export framework. An example of this is the Excel/spreadsheet format exporter in FPSpreadsheet
Import
There is no corresponding import to dataset code in FPC/Lazarus, but there is third party code like dbimport (https://bitbucket.org/reiniero/smalltools/src, directory dbimport).
DbImport is used in the LazSQLX and TurboBird database management tools for importing CSV (like) data into datasets.
Example
See the examples in your FPC source directory $(fpcdir)\source\packages\fcl-db\tests (see Databases#Running_FPC_database_tests), specifically testdbexport.pas.