Difference between revisions of "TSdfDataSet"
From Lazarus wiki
Jump to navigationJump to searchm |
m (added link to CSV#SDFDataset) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{TSdfDataSet}} | ||
'''TSdfDataSet''' [[image:tsdfdataset.png]] is a database component that implements text-based <tt>[[TDataSet]]</tt> in [[SDF]] format. | '''TSdfDataSet''' [[image:tsdfdataset.png]] is a database component that implements text-based <tt>[[TDataSet]]</tt> in [[SDF]] format. | ||
Line 4: | Line 5: | ||
Record structure is derived from: | Record structure is derived from: | ||
* Schema property if assigned. Schema is TStringList so you can use for example: | * Schema property if assigned. Schema is TStringList so you can use for example: | ||
− | SDFDataSet1.Schema.CommaText := '"Field1=10","Field2=500"'; or | + | SDFDataSet1.Schema.CommaText := '"Field1=10","Field2=500"'; // or |
SDFDataSet1.Schema.Append('<Field>=<Size>'); | SDFDataSet1.Schema.Append('<Field>=<Size>'); | ||
− | + | Where <Field> is FieldName and <Size> is size of TStringField which will be created | |
* First line of text file if property FirstLineAsSchema is set to true | * First line of text file if property FirstLineAsSchema is set to true | ||
== See also == | == See also == | ||
* [[TDataSet]] | * [[TDataSet]] | ||
+ | * [[CSV#SDFDataset|Usage example]] | ||
{{LCL Components}} | {{LCL Components}} | ||
− | |||
− |
Latest revision as of 09:15, 14 July 2017
│
English (en) │
français (fr) │
русский (ru) │
TSdfDataSet is a database component that implements text-based TDataSet in SDF format.
Schema
Record structure is derived from:
- Schema property if assigned. Schema is TStringList so you can use for example:
SDFDataSet1.Schema.CommaText := '"Field1=10","Field2=500"'; // or SDFDataSet1.Schema.Append('<Field>=<Size>');
Where <Field> is FieldName and <Size> is size of TStringField which will be created
- First line of text file if property FirstLineAsSchema is set to true
See also