TurboDB Components

Index
Turbo Database
TurboDB Tools
TurboDB Components
    TTdbDataSet
    TTdbTable
    TTdbBatchMove
Frequently Asked Questions

[prev][next]

TurboDB Components is a set of Delphi components for incorporating easy, fast and reliable database functions into Web applications. The current version is available at http://www.dataweb.de/download/tdbcomponents.html.

TTdbDataSet

Derived from TDataSet TTdbDataSet implements all methods necessary to access TurboDB tables. You will never instantiate a TTdbDataSet object directly but rather use one of its descendants TTdbTable or TTdbQuery (the latter is still in development).

TTdbTable

Enables you to access a TurboDB database table, to browse the table, to edit insert and delete records, to filter records, to locate specific records, to view records in an order defined by an index and to see records linked to the current record in a master table.

You can use the TTdbTable class very much as you are used to with TTable. You may link datasources to it and view the table content in all sorts of database aware controls like TDbEdit, TDbGrid a.s.o. Yet there are some points to consider:

  • Filter expressions are TurboDB search-conditions. These search-conditions are more powerful than BDE filter expressions are. Read "Search-Conditions" in the Turbo Database manual.
  • The filtered record set is static. That means, if a record in a filtered data set is modified in a way such that it doesn't fit the filter condition any more it will stay in the data set until the filter is applied again.
  • Detail data sets are linked to the master data set not by given field names but by a pointer-like mechanism called record id. Therefore TTdbTable has no MasterFields property but determines automatically how to link. Refer to "Automatic Linking".
  • TTdbBatchMove

    This class is used for importing into and exporting from a TurboDB table. It is very similar to the TBatchMove component you know from the BDE components but uses a file rather than a table as the source/destination for import/export.

    Properties

    TdbTableThe TdbTable object that is involved in the batch move.
    FileNameThe table file that is involved in the batch move.
    DirectionIndicates if the batch move is to import records from the file into the table or to export records from the table into an file. bmdImport always means that records from the file are appended to the table. Export creates a new file containing all records of the table satisfying the filter condition.
    FileTypeThe format of the file the records are imported from or exported to. If you want to use the values of this enumeration type dynamically in your program you will have to use the unit TdbTypes.
    tfCommaFields separated by comma, records by line feed
    tfCrLfFields separated by line feed, records by double line feed
    tfCSVFields included in double quotes and sparated by semicolon, records separated by line feed
    tfDBase3dBase III+ file
    tfSemicolonFields separated by semicolon, records by line feed
    tfSFPFields included in double quotes and separated by comma
    tfTDBTurboDB table
    tfUnknownTries to determine the format by file extension and content, not yet functional
    tfXMLWell-formed XML document with RECORD and FIELD tags, field names given as name attribute
    ExportColumnNamesFirst record in output contains column names for export
    FilterMust contain valid TurboDB search-condition like filter in TTdbTable, exports/imports only records satisfying filter
    MappingsA list of field assignments used in the import to control the column mapping. An entry in this list is of the form <TargetColumnName>=<SourceColumnName>, where <TargetColumnName> is the name of a column in the TurboDB table you are importing into and <SourceColumnName> is the name of a column in the source table your are importing from. You should use the (one-based) column index for <SourceColumnName>, e.g. Name=#1, Age=#8, City=#98.

    Methods

    ExecuteExecutes the batch move using the properties set

    Events

    OnProgressFired every once in a while during batch move. Use OnProgress to show a progress bar.

    [prev][next]

    Last updated on 6/2/2000. Copyright (c) 2000 by dataWeb GmbH, Aicha, Germany. Turbo Database and TurboDB Components are products by dataWeb - the manufacturers of RAD tools for the Web. Please send your hints, questions and comments to Peter Pohmann.