Advantage Developer Zone


Advantage Delphi Enhancements

Monday, April 16, 2007

With the release of Advantage 8.1, several enhancements were added to the Delphi TDataSet Descendant for Delphi. These enhancements include the ability to use the Advantage Table Designer from within the IDE. The Advantage TDataSet components are included in the Advantage Data Access Components (ADAC) installation if you are using Delphi 8 or newer. If you are using an older version of Delphi, the components are included in the TDataSet Descendant installation.  

Accessing the Table Designer

Traditionally, developers are required to use a separate tool to create and modify the tables used by their application. In the early design of the database and application, this is not a major issue; however, there are times when minor alterations to a table structure are necessary. Developers can now make these changes using the Advantage TDataSet Descendant for Delphi.

The Table Designer used in Advantage Data Architect (ARC) can be accessed from within the Delphi IDE. This gives the developer the ability to alter fields, add fields, and modify field and table properties. The Table Designer also allows for the creation of both order indexes and content (full text search) indexes.

To access the Table Designer, right-click on a TAdsTable component and choose ALTER/Restructure Table from the menu. The metadata for the table specified by the component will be displayed in the Table Designer.

The Advantage Table Designer can also be accessed in earlier versions of Delphi. The screenshot below is from the Delphi 7 IDE.

Using the Table Designer

The Table Designer was redesigned for Advantage Data Architect 8.0 and combines all of the common table tasks into a single interface. All of the field properties, as well as index information, can be modified from this single view.

Data dictionary bound tables contain a wealth of properties that can be set through the interface, including constraints such as Minimum and Maximum values. Custom field descriptions and field validation methods can also be specified. Indexes can be created on individual fields on the field tab.

An example of a data dictionary bound table is shown below:

Free tables can also be altered using the Table Designer. However, free tables do not have as many properties as their dictionary bound counterparts. Constraints cannot be defined and there are no table properties to modify.

An example of the Table Designer with a free table is shown below:

Indexes can be specified on the field tab for single field indexes. For more complex indexes or to specify additional index options, use the Additional Index Definitions tab.


By providing access to the Table Designer component, developers can now make changes to their tables without leaving the Delphi IDE. This increases productivity and allows the developer to stay on task coding while still being able to make table changes as necessary.