TurboDB VCL Component Library

Porting a BDE application to TurboDB

Previous  Top  Next

Porting BDE applications that use Paradox or dBase files to TurboDB is easy because TurboDB is based on components very similar to the BDE components. TTdbDataSet replaces TBDEDataSet, TTdbTable replaces TTable, TTdbQuery replaces TQuery, TTdbDatabase replaces TDatabase and TTdbBatchMove replaces TBatchMove. These TurboDB components offer the same properties, methods and events as the BDE components, so you can re-use most of your existing source code with TurboDB.

Basically, porting your BDE application works like this:

a) Using the TurboDB Table convert assistant (only available in Delphi/C++ versions with integrated BDE)

1.Install TurboDB within your Delphi IDE.
2.Make a back-up of your BDE project and open it in the Delphi IDE.
3.Place a TTdbTable object near each TTable component in your application.
4.Right click on each TTdbTable component and select the "Convert BDE Table" command.
5.Select the TTable component you want to convert.
6.TurboDB will create a TurboDB table and copy the contents of the BDE table. It will also copy the properties of the BDE table component.
7.Rename all TTable components and give the TTdbTable components the original name of the TTable components.
8.If your project contains TQuery objects, replace them by TTdbQuery. You can just copy the SQL property value if necessary. See  "TurboSQL vs. Local SQL" for the differences between the SQL dialects.
9.If your project contains a TDatabase and/or TSession object, replace it by a TTdbDatabase object.
10. If your project contains a TBatchMove component, use a TTdbBatchMove component instead.
11. Now compile and run your application. If you get error messages from the compiler or from your application, please consult "Differences between BDE and TurboDB".

 

b) Manual conversion

1.Open the TurboDB Viewer and convert all BDE tables needed in your project to TurboDB (Tools/Import Tables). Check within the Viewer if all tables were converted properly.
2.Install TurboDB within your Delphi IDE.
3.Make a back-up of your BDE project and open it in the Delphi IDE.
4.Place a TTdbTable object near each TTable component in your application and open the corresponding TurboDB table as converted in step 1.
5.At the TTdbTable set the following properties: AutoCalcFields, Exclusive, Filter, FilterOptions, ReadOnly, IndexName, Filtered.
Look around the the correspondent properties at the TTable.
6.Proceed likewise with the events of the TTdbTable component.
7.Rename all TTable components and give the TTdbTable components the original name of the TTable components.
8.If your project contains TQuery objects, replace them by TTdbQuery. You can just copy the SQL property value if necessary. See  "TurboSQL vs. Local SQL" for the differences between the SQL dialects.
9.If your project contains a TDatabase and/or TSession object, replace it by a TTdbDatabase object.
10. If your project contains a TBatchMove component, use a TTdbBatchMove component instead.
11. Now compile and run your application. If you get error messages from the compiler or from your application, please consult "Differences between BDE and TurboDB".