Obtain All Values from Multivalue Input Fields in WebBroker Applications (cont'd)


One-Way Datasets: A Blessing and a Curse
The equivalent of the BDE TTable component is the dbExpress TSQLTable component. The main difference is the TSQLTable component returns a read-only and unidirectional dataset. This means that you can navigate only forward, to walk through once. If you try to move backwards it raises an exception. The same is true for the BDE TQuery component, which is the equivalent of is the dbExpress TSQLQuery component. The main difference is the fact that the TSQLQuery component returns a read-only and unidirectional dataset. Just like the TSQLTable component.

Unidirectional datasets involve no caching or overhead, that's the main reason why dbExpress data access components are much faster than their BDE equivalents. On the other hand, the dbExpress components like TSQLTable and TSQLQuery are much harder to use on a visual form connecting to a DBGrid or DBNavigator, for example (I'll demonstrate how to do that on page 4).

The equivalent of the BDE TStoredProc component is the dbExpress TSQLStoredProcedure component. However, you can expect a number of problems, since a stored procedure for one DBMS is likely to differ from a stored procedure for use in another DBMS. InterBase, which runs on Windows as well as Linux, might be the only exception.

ClientDataSets
Now that we've mapped four basic BDE dataset components, we notice that we have two dbExpress components left: the TSQLDataSet and TSQLClientDataSet. The TSQLDataSet component is in fact capable of acting like a TSQLTable, TSQLQuery, or TSQLStoredProcedure all in one, with the CommandType as the main discriminator (the value of CommandType determines how the value of the CommandText property is interpreted).

TSQLClientDataSet is a combination of TSQLDataSet and a TClientDataSet component that produces a bi-directional caching dataset Remember that the TSQLTable, TSQLQuery, and TSQLStoredProcedure each return a unidirectional read-only dataset. So if you want to use them in a bi-directional way you need to connect these three components to a TClientDataSet component via a TDataSetProvider component—or, as I just said, use the TSQLClientDataSet component instead.




Previous: Step One: Convert Data to Linux-Friendly Format
 
Next: Solution in Action: Create an App with Delphi/Windows and Kylix/Linux


Introduction One-Way Datasets: A Blessing and a Curse
Step One: Convert Data to Linux-Friendly Format Solution in Action: Create an App with Delphi/Windows and Kylix/Linux


Return to Get Help with Delphi Page

Return to Main Get Help Page
 
The Borland Database Engine (BDE) runs only on Windows, so Delphi applications that use it are not portable to Linux.




Move your application from the BDE to dbExpress, the new cross-platform, data access layer found in Kylix and future versions of Delphi, by replacing BDE data access components with corresponding dbExpress components and converting your data.


Find Out More
• Get the source code for this Solution!

• The borland.public.kylix.database.dbexpress newsgroup at newsgroups.borland.com

• The Kylix For Delphi Developers page on the Borland Web site

TALK BACK
Do you expect dbExpress to replace the Borland Database Engine? Delphi 6 has been rumoured to include support for both the BDE and dbExpress. But will your new Delphi 6 projects be using BDE or dbExpress? Let us know in the database development discussion groups!
 





Sponsored Links