TParadoxDataSet
English · Français · Português
Note: Paradox uses the BDE (Borland Database Engine) that is unmaintained and unsupported since around 2000.
TParadoxDataSet is a TDataSet that can read (***but not write!***) Paradox files up to Version 7.
Its main characteristics are :
- Data-aware implementation, i.e. the component is a descendant of TDataset, and you can use the standard data-aware Lazarus components to display the table contents.
- All table levels up to version 7
- No external DLL needed (unlike the TParadox component that comes with Lazarus). Works in 32- and 64-bit operating systems.
- Now supports BLOB fields, character encoding, filtering and bookmarks.
The motivation for having the component read-only is to provide a way to read old Paradox files for converting to newer database formats.
Author/License
- Author: Christian Ulrich
- License: Mozilla Public License 1.1, or LGPL
Download
The latest stable release (v0.2) can be found at
Bug reporting / Feature Request
Please report bugs to the Lazarus Bugtracker in Category Packages
SVN
You can get the latest source via SVN:
svn checkout https://svn.code.sf.net/p/lazarus-ccr/svn/components/tparadoxdatasetChange Log
- 31 January 2007 - Initial release
- May 2019 - Update to current FPC/Lazarus versions, 64-bit, BLOB support, filtering, bookmarks, character encoding
Status: Beta
Installation
- If needed, unzip the files from the zip file to any directory.
- In Lazarus, open the package .lpk file with "Package" > "Open package file (.lpk)". In v0.2 there are two packages; both have the same content, but lazparadox.lpk has a naming conflict with the Paradox package contained in the Lazarus distribution; therefore it is recommended to install lazparadoxpkg.lpk instead.
- If you don't want to install the component into the IDE, click on "Compile".
- If you want to install the component into the IDE, click on "Use" > "Install". Confirm the prompt to rebuild the IDE. When Lazarus restarts you'll find the component
TParadoxDataseton palette "Data Access".
Usage
- Drop the
TParadoxDatasetcomponent on the form. - Specify the name of the table file (extension ".db") in property
TableName - Set
Activetotruein order to open the table. When, for example, a DBGrid is linked to the dataset the table is immediately displayed. - The encoding of text fields used in the file is displayed in the read-only property
InputEncoding. It is automatically converted to the encoding given in propertyTargetEncodingwhich defaults to "UTF8". In the case that text fields must be encoded differently specify the codepage name here, e.g. "CP1252" for Western Europe code page (use the (case-insensitive) names given in the LazUtils unit lconvencoding). - Filtering: Set
Filteredtofalse. Then define the filter conditon in propertyFilteror use theOnFilterRecordevent. Finally start the filtering action by settingFilteredtotrue. - Bookmarks: Store the currently active record as a bookmark by setting the variable
bookmark(which is of typeTBookmarktoParadoxDataset1.GetBookmark. For returning to this record, callParadoxDataset1.GotoBookmark(boomark). Since the component uses theRecNoas bookmarks it is not required to callFreeBookmark.
See also
From the Free Pascal wiki, page "TParadoxDataSet", as it stood on 2019-05-12 after a change by Wp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
