TurboDB VCL Component Library

Upgrading a Major Version

Previous  Top  Next

There are some modifications to your existing project that you may have to do when upgrading from version 5 and below. When you compile your program the first time with the VCL components for TurboDB 5, you must open all forms in the IDE and click on the ignore button, whenever a message comes up related to TurboDB components. This is due to removed/replaced properties in the component set, but if you follow the instructions in this topic, your application will run as before.

From TurboDB 5

TTdbDataSet.Filter and TTdbDataSet.Locate

Because TurboDB 6 supports true collations and therefore the case sensitivity is now defined in the table column, the FilterOption value foCaseInsensitive and the LocateOption value loCaseInsensitive are without function. If you used these options, you must upgrade your database to level 6 and define the respective collation for the table or column.

TTdbTable.LangDriver

Because TurboDB 6 now supports true collations, you cannot use language drivers anymore. The property still exists for formal compatibility but is no more used. TTdbTable now has a new property Collation, which defines the default collation for its textual columns. If you have been using a language driver, upgrade the tables to level 6 and choose the corresponding collation for them.

TField for Links, Relations and Enumerations

Since links, relations and enumerations are now handled as Unicode strings in Delphi 2009 and above, corresponding fields must be of type TWideStringField instead of TStringField. When converting older programs you must delete fields of these types and re-create them.

From TurboDB 4

Directory Property

This property was already marked as obsolete in TurboDB 4 and has now been removed. Use the property Location instead.

Property FilterType

This property has been removed because it is no more necessary. With TurboDB 5 you can search for a condition and for keywords at the same time. When you first open a form with TTdbTable components on it in the Delphi/C++ Builder IDE, click Ignore in the dialog box telling you about the missing property.

Table Protection

Tables have now the EncryptionMethod property and the Password property instead of the Password property and the Key property. If you want to protect your table, you must now set the EncryptionMethod. In order to be compatible with TurboDB 4, this property must be set to temClassic if you have used a key or to temProtection if you did not use a key, just a password. If you have been using a key with TurboDB 4, please refer to the topic on the Password property to learn how to accommodate it. The password property is now a WideString instead of an AnsiString in TurboDB 4.

Related to this is a modification in the OnPassword event. Since keys are no more used in TurboDB 5, this parameter has been removed from the event's signature.

Full-text Indexes

You can continue to use the full-text searching code with your VCL components. But if you want to upgrade to the new table level 4 or if you want to profit from the new full-text index features like improved performance, ranking and maintained indexes, you must change your program code slightly but you will basically make it simpler.

With the new full-text search, there is no need to link to the keyword table anymore. The word filter still works the same way as before but instead of calling AddFulltextIndex you now call AddFulltextIndex2. And there is an additional UpdateFulltextIndex method, which needs only the full-text index name as its input.

Upgrading Issues on the Database Level

Further considerations especially for SQL statements.