From f8cc8d08d4be274cc65de1d7b5e8cd05d089e95d Mon Sep 17 00:00:00 2001 From: kirkpatc Date: Wed, 9 Jan 2008 10:34:24 +0000 Subject: [PATCH] LazDoc - fix typos in HowToUseDataAwareControls git-svn-id: trunk@13684 - --- docs/xml/lcl/dbctrls.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/xml/lcl/dbctrls.xml b/docs/xml/lcl/dbctrls.xml index b2d44716e0..e507fb7970 100644 --- a/docs/xml/lcl/dbctrls.xml +++ b/docs/xml/lcl/dbctrls.xml @@ -4468,7 +4468,7 @@

HowToUseDataAwareControls - Hints for accessing databases. A set of Data-Aware components is provided, to make it easier to access information held in databases.

Before using Data-Aware components, it is necessary to make a connection with a database, and this should be done either using a TSQLConnection or a TDBf component, depending on the type of database that is being used. In any case, the components for connection with the database need to be found in $Lazdir/components/sqldb/, $Lazdir/components/tdbf/ or whatever other source is appropriate. They need to be added using the Components Menu Item of the IDE, and compiled ready for adding. The IDE needs to be re-built to include the new components.

-

To make the connection with the database: first place a DataBase Connection on the Form (invisible at run-time, so put it anywhere convenient); set its properties to connect the user (with name and password) to the appropriate server, database and table (the connection component should deal with all the user-authentication issues, opening and closing the database etc). Then put on a TDataSource from the Data Access tab of the Component Palette, and perhaps items such as

TSQLTransaction

and

TSQLQuery

, depending on the particular database you are using. The various database components need to be linked to each other, for example by setting the Transaction property of a database connector to the appropriate transaction component, and linking the DataBase property of the Transaction component back to the database connector; link the DataSource's DataSet property to the appropriate SQLQuery or other set of data, and its Transaction property to the transaction component

+

To make the connection with the database: first place a DataBase Connection on the Form (invisible at run-time, so put it anywhere convenient); set its properties to connect the user (with name and password) to the appropriate server, database and table (the connection component should deal with all the user-authentication issues, opening and closing the database etc). Then put on a TDataSource from the Data Access tab of the Component Palette, and perhaps items such as TSQLTransaction and TSQLQuery, depending on the particular database you are using. The various database components need to be linked to each other, for example by setting the Transaction property of a database connector to the appropriate transaction component, and linking the DataBase property of the Transaction component back to the database connector; link the DataSource's DataSet property to the appropriate SQLQuery or other set of data, and its Transaction property to the transaction component

Each Data-Aware control (on the Data Controls tab of the Component Palette) has the usual set of properties to determine its shape and size, position, colour and font etc. But there are also special properties to define the data to be displayed or modified. These include the DataSource property which must be set to link to the defined set of data, and often a Field component to determine which of the columns in the database is to be displayed.

Most of the components operate on a single Row or record of the database, but the TDBGrid is capable of displaying and operating on multiple rows and columns, in a StringGrid format, allowing the user to get an overview of what is in the database. The DBGrid will display the contents of the DataSet even at design time, provided the various components are enabled or rendered active; this allows the designer to ensure that all the connections to the database have been correctly made.

The TDBNavigator component is used in conjunction with the Data-Aware components. It consists of a series of buttons to allow browsing through the DataSet, displaying the first, previous, next or last record (or Row), inserting or deleting records, committing the changes back to the database or refreshing the DataSet from the database.