Component Name: TTextTable
Version: 0.82
Platform: Delphi 3/4
Sources: In registered version
Example: Included
Documentation: You read it :)
Author: Vladimir Savelev (c) 1998
Contact e-mail:
[email protected]
Description: Simple descendant of TDataSet.
Implements simple dataset capabilities
for text based data files.
Works without BDE.
Also capable to store single loaded text
table in form (and further, in exe).
This component provides data base like access to tab
(or what you want,for example comma) separated text file.
Since this component is a descedant from TDataSet, it can be used
with most of data aware controls, such as DBGrid, DBNavigator, etc.
All fields are established as String fields, for simplicity.
Also this component can save loaded text file in form and further
is executable. Such text data can be modified, but doesn't stored.
Installing:
Unzip txttable.zip to separate directory.
Copy contents of D3(D4) folder (two .dcu files and package file)
to directory in you Delphi path and install package txttbl.
Added properties and methods:
property DivChar : char
Fields separator, default - Tab (#9)
property SepChar : char
Quote character, default - " (quote symbol)
Maded to understand field values like
Mary;Jon;Dave (when DivChar=;)
For using SepChar in field values use it twice:
real value: I say: "Hello";She says "Bye"
stored in file as: "I say: ""Hello"";She says ""Bye"""
property WinText: boolean
Property added for reading old DOS coded data (national symbols).
True - don't decode text
False - make OemToAnsi conversion
property KeepData : boolean
True - store data in form
False - load data only from files
property FileName : string
name of text file. Better with full pathname
function FindKey(const KeyValues: array of const): Boolean;
This function added for my purposes. It seems like similar
function in TTable, but it finds only first entry of KeyValues
in first column of text file.
procedure PasteFromClipboard;
This procedure adds data from clipboard (only if number of columns
is equal to number of fields in dataset) to you table.
procedure CreateFromClipboard;
This procedure creates dataset from clipboard. First row is
cosidered is field names.
Please, send me any suggestions, bug reports and opinions.
29.06.98
Vladimir Savelev
[email protected]