Difference between revisions of "TParadoxDataSet"

From Lazarus wiki
Jump to navigationJump to search
m
 
(18 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
{{TParadoxDataSet}}
 
{{TParadoxDataSet}}
  
=== About ===
+
{{Infobox databases}}
 +
{{Note|Paradox uses the '''BDE''' (Borland Database Engine) that is unmaintained and unsupported since around 2000.}} 
 +
[[file:tparadoxdataset_150.png]] '''TParadoxDataSet''' is a <code>[[TDataSet]]</code> that can read ('''''but not write!''''') Paradox files up to Version 7.
  
TParadoxDataSet is an TDataSet that can read 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.
  
Its main caracteristics are :
+
The motivation for having the component read-only is to provide a way to read old Paradox files for converting to newer database formats.
  
* Data aware implementation
+
=== Author/License ===
* All Table Levels up to Version 7
+
* Author: [[User:Christian|Christian Ulrich]]  
 
+
* License: [https://opensource.org/licenses/MPL-1.1 Mozilla Public License 1.1], or [http://www.opensource.org/licenses/lgpl-license.php LGPL]
=== Author ===
 
Author: [[User:Christian|Christian Ulrich]]  
 
 
 
=== License ===
 
[http://www.opensource.org/licenses/lgpl-license.php LGPL]
 
  
 
=== Download ===
 
=== Download ===
The latest stable release can be found on
+
The latest stable release (v0.2) can be found at
* [http://www.ullihome.de Christians Homepage].
+
* [https://sourceforge.net/projects/lazarus-ccr/files/Paradox%20DataSet/tparadoxdataset-v0.2.zip/download Lazarus CCR]
* [http://tcs.ullihome.de/tparadox.zip Download Directlink]
 
* [http://sourceforge.net/project/showfiles.php?group_id=92177&package_id=222064 Lazarus CCR]
 
  
 
=== Bug reporting / Feature Request ===
 
=== Bug reporting / Feature Request ===
 
+
Please report bugs to the [http://www.freepascal.org/mantis/set_project.php?project_id=3 Lazarus Bugtracker] in Category Packages
Please Report Bugs to the [http://www.freepascal.org/mantis/set_project.php?project_id=3 Lazarus Bugtracker] in Category Packages
 
  
 
=== SVN ===
 
=== SVN ===
 +
You can get the latest source via SVN:
 +
<syntaxhighlight lang="bash">
 +
svn checkout https://svn.code.sf.net/p/lazarus-ccr/svn/components/tparadoxdataset
 +
</syntaxhighlight>
  
you can checkout the actual source from<br>
+
=== Change Log ===
 +
* 31 January 2007 - Initial release
 +
* May 2019 - Update to current FPC/Lazarus versions, 64-bit, BLOB support, filtering, bookmarks, character encoding
  
https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/tparadoxdataset
+
Status: Beta
  
commandline to do this is
+
=== 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 [[TParadox|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 <code>TParadoxDataset</code> on palette "Data Access".
  
svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/tparadoxdataset
+
=== Usage ===
 +
* Drop the <code>TParadoxDataset</code> component on the form.
 +
* Specify the name of the table file (extension ".db") in property <code>TableName</code>
 +
* Set <code>Active</code> to <code>true</code> in 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 <code>InputEncoding</code>. It is automatically converted to the encoding given in property <code>TargetEncoding</code> which 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 <code>Filtered</code> to <code>false</code>. Then define the filter conditon in property <code>Filter</code> or use the <code>OnFilterRecord</code> event. Finally start the filtering action by setting <code>Filtered</code> to <code>true</code>.
 +
* '''Bookmarks''': Store the currently active record as a bookmark by setting the variable <code>bookmark</code> (which is of type <code>TBookmark</code> to <code>ParadoxDataset1.GetBookmark</code>. For returning to this record, call <code>ParadoxDataset1.GotoBookmark(boomark)</code>. Since the component uses the <code>RecNo</code> as bookmarks it is not required to call <code>FreeBookmark</code>.
  
=== Change Log ===
+
==See also ==
* 31.01.2007 Release
+
* [[TParadox]]
  
Status: Beta
+
[[Category:Components]]
 
+
[[Category:Databases]]
=== Installation ===
+
[[Category:Lazarus-CCR]]
* unzip the files from the zip file to lazarus\components\
 
* Open lazarus
 
* Open the package .lpk with Component/Open package file (.lpk)
 
* (Click on Compile is only necessary, if you don't want to install the component into the IDE)
 
* Click on Install
 

Latest revision as of 17:02, 12 May 2019

English (en) français (fr) português (pt)

Databases portal

References:

Tutorials/practical articles:

Databases

Advantage - MySQL - MSSQL - Postgres - Interbase - Firebird - Oracle - ODBC - Paradox - SQLite - dBASE - MS Access - Zeos
Light bulb  Note: Paradox uses the BDE (Borland Database Engine) that is unmaintained and unsupported since around 2000.

tparadoxdataset 150.png 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

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/tparadoxdataset

Change 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 TParadoxDataset on palette "Data Access".

Usage

  • Drop the TParadoxDataset component on the form.
  • Specify the name of the table file (extension ".db") in property TableName
  • Set Active to true in 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 property TargetEncoding which 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 Filtered to false. Then define the filter conditon in property Filter or use the OnFilterRecord event. Finally start the filtering action by setting Filtered to true.
  • Bookmarks: Store the currently active record as a bookmark by setting the variable bookmark (which is of type TBookmark to ParadoxDataset1.GetBookmark. For returning to this record, call ParadoxDataset1.GotoBookmark(boomark). Since the component uses the RecNo as bookmarks it is not required to call FreeBookmark.

See also