Turbo C++ / C++Builder Database Development
Right after Turbo C++ was released, I published a free courseware manual on Turbo C++ / C++Builder Database Development, which can now be downloaded in PDF format.
Topics include BDE, dbGo for ADO, the ClientDataSet and dbExpress.
The contents of this Turbo C++ / C++Builder 2006 Database Development courseware manual is based on my articles about C++Builder 6 and Database Development that were published in the C++Builder Developerís Journal in 2005. Iíve migrated the articles to C++Builder 2006 and Turbo C++ by retaking all screenshots and verifying the code and steps against the new version of the C++Builder IDE.
- Database Development
In this section, I'll introduce the data model for the courseware manual on data access technologies available in Turbo C++ and C++Builder (also described in some detail here).
- Data Access Technologies
CD/DVD Data Model
- The Borland Database Engine
In this section, I'll cover the Borland Database Engine and the data access as well as data aware controls that can be used with C++Builder.
We'll see how to define persistent fields, lookup fields and calculated fields, and how to create dynamic tables using C++ code.
- Local Tables
Example DVD Application
Creating Tables using Database Desktop
Creating Tables in C++
r BDE Data Access
- BDE Example Application
Creating Tables for Data Module
- Data-Aware Controls
- dbGo for ADO
In this section, I'll cover the dbGo for ADO data access technology by migrating the data from Paradox to SQL Server, and the BDE data module to an dbGo for ADO data module.
We'll also see how to use Stored Procedures, a feature only available in a real DBMS like Microsoft SQL Server / MSDE (and not in local BDE Paradox or dBASE tables).
- dbGo for ADO
- Migration to ADO
SQL Server / MSDE
Migrating Data Module
In this section, I'll migrate the SQL Server data to the TClientDataSet MyBase local table format.
We'll see how we can mimic the behaviour of queries by using the TClientDataSet's Filter property, and experimented with the data and delta (changes) of the TClientDataSets.
Finally, we'll add the ability to actually borrow DVDs in our example application.
- Standalone TClientDataSet
New Data Module
Adding Lookup Field
Adding Calculated Field
Updates and Undo
Connecting the GUI
Local XML Files
In this section, I'll migrate the DVDs from the local MyBase format back into the SQL Server / MSDE database.
We then migrate the data modules to a disconnected model using dbExpress, and learned that a dbExpress dataset is unidirectional and read-only, meaning we have to use a TDataSetProvider and TClientDataSet in combination with a dbExpress dataset in order to be able to navigate and work with (modify) the data.
- Disconnected Data
- Migrating to dbExpress
Read-Only & Unidirectional
TClientDataSet to the Rescue
- CDS to DBX
ApplyUpdates and MaxErrors
ChangeCount and Undo
dbExpress Data Module
- Additional Fields
Connecting the GUI
Update after Post / Delete
Update on Request
Who's Got It?
The free version of this Turbo C++ / C++Builder Database Development courseware manual is distributed in a PDF format that can only be read on a computer screen, and cannot be printed (nor can you select and copy text or code snippets from the document).
For 15 Euro or 21 US$ you can get a personal version of the PDF file that can be printed, including full source code with projects for C++Builder 2006 (the free version of the manual contains more details).
This webpage © 2006-2010 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.