mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 08:58:02 +02:00
914 lines
28 KiB
XML
914 lines
28 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
|
|
Documentation for LCL (Lazarus Component Library) and LazUtils (Lazarus
|
|
Utilities) are published under the Creative Commons Attribution-ShareAlike 4.0
|
|
International public license.
|
|
|
|
https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt
|
|
https://gitlab.com/freepascal.org/lazarus/lazarus/-/blob/main/docs/cc-by-sa-4-0.txt
|
|
|
|
Copyright (c) 1997-2025, by the Lazarus Development Team.
|
|
|
|
-->
|
|
<fpdoc-descriptions>
|
|
<package name="lcl">
|
|
<!--
|
|
====================================================================
|
|
DBActns
|
|
====================================================================
|
|
-->
|
|
<module name="DBActns">
|
|
<short>
|
|
Standard actions used to navigate and manipulate a dataset in a datasource.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<file>dbactns.pp</file> contains classes used to implement
|
|
<var>TDataSetAction</var> and its descendants. They are dataset-aware actions
|
|
used to navigate and manipulate a dataset in a datasource.
|
|
</p>
|
|
<p>
|
|
<file>dbactns.pp</file> is part of the Lazarus Component Library (<b>LCL</b>).
|
|
</p>
|
|
<p>
|
|
The following components are registered but not displayed on the Lazarus IDE
|
|
component palette:
|
|
</p>
|
|
<ul>
|
|
<li>TDataSetFirst</li>
|
|
<li>TDataSetLast</li>
|
|
<li>TDataSetNext</li>
|
|
<li>TDataSetPrior</li>
|
|
<li>TDataSetRefresh</li>
|
|
<li>TDataSetCancel</li>
|
|
<li>TDataSetDelete</li>
|
|
<li>TDataSetEdit</li>
|
|
<li>TDataSetInsert</li>
|
|
<li>TDataSetPost</li>
|
|
</ul>
|
|
</descr>
|
|
|
|
<element name="Classes"/>
|
|
<element name="DB"/>
|
|
<element name="ActnList"/>
|
|
|
|
<element name="TDataSetAction">
|
|
<short>
|
|
<var>TDataSetAction</var> is the base class for all other standard
|
|
<var>TDataSet</var> actions.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDataSetAction</var> is a <var>TAction</var> descendant that is the base
|
|
class for all other standard <var>TDataSet</var> actions. TDataSetAction
|
|
provides properties and methods which enables an action to be applied to a
|
|
DataSource and its associated dataset.
|
|
</p>
|
|
<p>
|
|
<var>TDataSetAction</var> provides an overridden Notification method to
|
|
perform component notifications when the <var>DataSource</var> is removed for
|
|
the action. A virtual <var>GetDataSet</var> method is implemented to ensure
|
|
that a <var>DataSource</var> is cast to a <var>TDataSource</var> class
|
|
instance prior to accessing its dataset. The <var>HandlesTarget</var> method
|
|
is overridden to determine if the class includes both a valid datasource and
|
|
a dataset for a specified target.
|
|
</p>
|
|
<p>
|
|
Applications do not use instances of <var>TDataSetAction</var>; use one of
|
|
the descendent classes that perform a specific action for a dataset.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetFirst"/>
|
|
<link id="TDataSetLast"/>
|
|
<link id="TDataSetNext"/>
|
|
<link id="TDataSetPrior"/>
|
|
<link id="TDataSetRefresh"/>
|
|
<link id="TDataSetCancel"/>
|
|
<link id="TDataSetDelete"/>
|
|
<link id="TDataSetEdit"/>
|
|
<link id="TDataSetInsert"/>
|
|
<link id="TDataSetPost"/>
|
|
<link id="#lcl.actnlist.TAction">TAction</link>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDataSetAction.FDataSource" link="#lcl.dbactns.TDataSetAction.DataSource"/>
|
|
|
|
<element name="TDataSetAction.SetDataSource">
|
|
<short>Sets the value for the DataSource property.</short>
|
|
<seealso>
|
|
<link id="TDataSetAction.DataSource"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TDataSetAction.SetDataSource.Value">
|
|
<short>New value for the property.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetAction.Notification">
|
|
<short>
|
|
Performs a notification when the datasource for the component is removed.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>Notification</var> is an overridden procedure used to perform a
|
|
notification message when the specified component is removed.
|
|
<var>AComponent</var> contains the component for the notification message.
|
|
<var>Operation</var> contains the operation for the notification message.
|
|
</p>
|
|
<p>
|
|
<var>Notification</var> calls the inherited method. When <var>Operation</var>
|
|
contains the value <var>opRemove</var> and <var>AComponent</var> contains the
|
|
same class instance as the <var>DataSource</var> property, the
|
|
<var>DataSource</var> property is set to <b>Nil</b>.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetAction.DataSource"/>
|
|
</seealso>
|
|
</element>
|
|
<element name="TDataSetAction.Notification.AComponent">
|
|
<short>Component for the notification.</short>
|
|
</element>
|
|
<element name="TDataSetAction.Notification.Operation">
|
|
<short>Operation for the notification.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetAction.GetDataSet">
|
|
<short>Gets the Dataset assigned to the specified target datasource.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetAction.GetDataSet.Result">
|
|
<short>TDataSet assigned to the specified target datasource.</short>
|
|
</element>
|
|
<element name="TDataSetAction.GetDataSet.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetAction.HandlesTarget">
|
|
<short>Indicates if the action is handled for the specified target.</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetAction.HandlesTarget.Result">
|
|
<short>
|
|
<b>True</b> when a valid DataSource and DataSet exist in the Target.
|
|
</short>
|
|
</element>
|
|
<element name="TDataSetAction.HandlesTarget.Target">
|
|
<short>Object instance examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetAction.DataSource">
|
|
<short>
|
|
DataSource with the dataset for the action.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>DataSource</var> is a <var>TDataSource</var> property which provides
|
|
access to properties, methods, and events for the <var>TDataSet</var> used in
|
|
the data source. Changing the value for <var>DataSource</var> causes a free
|
|
notification message to be performed for the new class instance used as the
|
|
value for the property.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
<element name="TDataSetFirst">
|
|
<short>
|
|
<var>TDataSetFirst</var> moves to first record in the <var>DataSet</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDataSetFirst</var> is a <var>TDataSetAction</var> descendant which
|
|
moves to the first record in the dataset for a DataSource. TDataSetFirst can
|
|
be added to an action list and assigned to controls which perform the
|
|
corresponding action.
|
|
</p>
|
|
<p>
|
|
<var>TDataSetFirst</var> publishes the <var>DataSource</var> property which
|
|
explicitly declares the target for the database action. The DataSource may be
|
|
determined by examining a data-aware control which used the database action,
|
|
and passed an an argument to the UpdateTarget and HandlesTarget methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetLast"/>
|
|
<link id="TDataSetNext"/>
|
|
<link id="TDataSetPrior"/>
|
|
<link id="TDataSetRefresh"/>
|
|
<link id="TDataSetCancel"/>
|
|
<link id="TDataSetDelete"/>
|
|
<link id="TDataSetEdit"/>
|
|
<link id="TDataSetInsert"/>
|
|
<link id="TDataSetPost"/>
|
|
<link id="TDataSetAction"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDataSetFirst.ExecuteTarget">
|
|
<short>
|
|
Retrieves the dataset for the target datasource and calls its First method.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetFirst.ExecuteTarget.Target">
|
|
<short>Target where the action is performed in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetFirst.UpdateTarget">
|
|
<short>
|
|
Enables or disables the action based on the state of the dataset in the
|
|
target.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateTarget</var> is an overridden method which enables or disables the
|
|
database action based on the state of the dataset in the Target object.
|
|
<var>UpdateTarget</var> calls the <var>GetDataSet</var> method to retrieve
|
|
the dataset in the Target datasource. The action is Enabled when the dataset
|
|
is active and not already positioned at its beginning (or first record). This
|
|
ensures that the action cannot be performed for a dataset that has not been
|
|
opened, or does not require repositioning.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetFirst.UpdateTarget.Target">
|
|
<short>Target datasource examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetFirst.DataSource" link="#lcl.dbactns.TDataSetAction.DataSource"/>
|
|
|
|
<element name="TDataSetLast">
|
|
<short>
|
|
<var>TDataSetLast</var> moves to last record in the <var>DataSet</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDataSetLast</var> is a <var>TDataSetAction</var> descendant which moves
|
|
to the last record in the dataset for a DataSource. TDataSetLast can be added
|
|
to an action list and assigned to controls which perform the corresponding
|
|
action.
|
|
</p>
|
|
<p>
|
|
<var>TDataSetLast</var> publishes the DataSource property which explicitly
|
|
declares the target for the database action. The DataSource may be determined
|
|
by examining a data-aware control which used the database action, and passed
|
|
an an argument to the UpdateTarget and HandlesTarget methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetFirst"/>
|
|
<link id="TDataSetNext"/>
|
|
<link id="TDataSetPrior"/>
|
|
<link id="TDataSetRefresh"/>
|
|
<link id="TDataSetCancel"/>
|
|
<link id="TDataSetDelete"/>
|
|
<link id="TDataSetEdit"/>
|
|
<link id="TDataSetInsert"/>
|
|
<link id="TDataSetPost"/>
|
|
<link id="TDataSetAction"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDataSetLast.ExecuteTarget">
|
|
<short>
|
|
Retrieves the dataset for the target datasource and calls its Last method.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetLast.ExecuteTarget.Target">
|
|
<short>Target datasource examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetLast.UpdateTarget">
|
|
<short>
|
|
Enables or disables the action based on the state of the dataset in the
|
|
target.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateTarget</var> is an overridden method which enables or disables the
|
|
database action based on the state of the dataset in the Target object.
|
|
</p>
|
|
<p>
|
|
<var>UpdateTarget</var> calls the <var>GetDataSet</var> method to retrieve
|
|
the dataset in the Target datasource. The action is Enabled when the dataset
|
|
is active and not already positioned at end-of-file (last record). This
|
|
ensures that the action cannot be performed for a dataset that has not been
|
|
opened, or does not require repositioning.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetLast.UpdateTarget.Target">
|
|
<short>Target datasource examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetLast.DataSource" link="#lcl.dbactns.TDataSetAction.DataSource"/>
|
|
|
|
<element name="TDataSetNext">
|
|
<short>
|
|
<var>TDataSetNext</var> moves to next record in the <var>DataSet</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDataSetNext</var> is a <var>TDataSetAction</var> descendant which moves
|
|
to the next record in the dataset for a DataSource. TDataSetNext can be added
|
|
to an action list and assigned to controls which perform the corresponding
|
|
action.
|
|
</p>
|
|
<p>
|
|
<var>TDataSetNext</var> publishes the DataSource property which explicitly
|
|
declares the target for the database action. The DataSource may be determined
|
|
by examining a data-aware control which uses the database action, and passed
|
|
an an argument to the UpdateTarget and HandlesTarget methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetFirst"/>
|
|
<link id="TDataSetLast"/>
|
|
<link id="TDataSetPrior"/>
|
|
<link id="TDataSetRefresh"/>
|
|
<link id="TDataSetCancel"/>
|
|
<link id="TDataSetDelete"/>
|
|
<link id="TDataSetEdit"/>
|
|
<link id="TDataSetInsert"/>
|
|
<link id="TDataSetPost"/>
|
|
<link id="TDataSetAction"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDataSetNext.ExecuteTarget">
|
|
<short>
|
|
Retrieves the dataset for the target datasource and calls its Next method.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetNext.ExecuteTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetNext.UpdateTarget">
|
|
<short>
|
|
Enables or disables the action based on the state of the dataset in the
|
|
target.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateTarget</var> is an overridden method which enables or disables the
|
|
database action based on the state of the dataset in the Target object.
|
|
</p>
|
|
<p>
|
|
<var>UpdateTarget</var> calls the <var>GetDataSet</var> method to retrieve
|
|
the dataset in the Target datasource. The action is Enabled when the dataset
|
|
is active and not already positioned at end-of-file (or last record). This
|
|
ensures that the action cannot be performed for a dataset that has not been
|
|
opened, or does not require repositioning.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetNext.UpdateTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetNext.DataSource" link="#lcl.dbactns.TDataSetAction.DataSource"/>
|
|
|
|
<element name="TDataSetPrior">
|
|
<short>
|
|
<var>TDataSetPrior</var> moves to previous record in the <var>DataSet</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDataSetPrior</var> is a <var>TDataSetAction</var> descendant which
|
|
moves to the previous record in the dataset for a DataSource. TDataSetPrior
|
|
can be added to an action list and assigned to controls which perform the
|
|
corresponding action.
|
|
</p>
|
|
<p>
|
|
<var>TDataSetPrior</var> publishes the DataSource property which explicitly
|
|
declares the target for the database action. The DataSource may be determined
|
|
by examining a data-aware control which used the database action, and passed
|
|
an an argument to the UpdateTarget and HandlesTarget methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetFirst"/>
|
|
<link id="TDataSetLast"/>
|
|
<link id="TDataSetNext"/>
|
|
<link id="TDataSetRefresh"/>
|
|
<link id="TDataSetCancel"/>
|
|
<link id="TDataSetDelete"/>
|
|
<link id="TDataSetEdit"/>
|
|
<link id="TDataSetInsert"/>
|
|
<link id="TDataSetPost"/>
|
|
<link id="TDataSetAction"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDataSetPrior.ExecuteTarget">
|
|
<short>
|
|
Retrieves the dataset for the target datasource and calls its Prior method.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetPrior.ExecuteTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetPrior.UpdateTarget">
|
|
<short>
|
|
Enables or disables the action based on the state of the dataset in the
|
|
target.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateTarget</var> is an overridden method which enables or disables the
|
|
database action based on the state of the dataset in the Target object.
|
|
</p>
|
|
<p>
|
|
<var>UpdateTarget</var> calls the <var>GetDataSet</var> method to retrieve
|
|
the dataset in the Target datasource. The action is Enabled when the dataset
|
|
is active and not already positioned at its beginning (or first record). This
|
|
ensures that the action cannot be performed for a dataset that has not been
|
|
opened, or does not require repositioning.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetPrior.UpdateTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetPrior.DataSource" link="#lcl.dbactns.TDataSetAction.DataSource"/>
|
|
|
|
<element name="TDataSetRefresh">
|
|
<short>
|
|
<var>TDataSetRefresh</var> refreshes the <var>DataSet</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDataSetRefresh</var> is a <var>TDataSetAction</var> descendant which
|
|
refreshes the record content in the dataset for a DataSource. TDataSetRefresh
|
|
can be added to an action list and assigned to controls which perform the
|
|
corresponding action.
|
|
</p>
|
|
<p>
|
|
<var>TDataSetRefresh</var> publishes the DataSource property which explicitly
|
|
declares the target for the database action. The DataSource may be determined
|
|
by examining a data-aware control which used the database action, and passed
|
|
an an argument to the UpdateTarget and HandlesTarget methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetFirst"/>
|
|
<link id="TDataSetLast"/>
|
|
<link id="TDataSetNext"/>
|
|
<link id="TDataSetPrior"/>
|
|
<link id="TDataSetCancel"/>
|
|
<link id="TDataSetDelete"/>
|
|
<link id="TDataSetEdit"/>
|
|
<link id="TDataSetInsert"/>
|
|
<link id="TDataSetPost"/>
|
|
<link id="TDataSetAction"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDataSetRefresh.ExecuteTarget">
|
|
<short>
|
|
Retrieves the dataset for the target datasource and calls its Refresh method.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetRefresh.ExecuteTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetRefresh.UpdateTarget">
|
|
<short>
|
|
Enables or disables the action based on the state of the dataset in the
|
|
target.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateTarget</var> is an overridden method which enables or disables the
|
|
database action based on the state of the dataset in the <var>Target</var>
|
|
object.
|
|
</p>
|
|
<p>
|
|
<var>UpdateTarget</var> calls the <var>GetDataSet</var> method to retrieve
|
|
the dataset in the Target datasource. The action is Enabled when the dataset
|
|
is active. This ensures that the action cannot be performed for a dataset
|
|
that has not been opened.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetRefresh.UpdateTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
<element name="TDataSetRefresh.DataSource" link="#lcl.dbactns.TDataSetAction.DataSource"/>
|
|
|
|
<element name="TDataSetCancel">
|
|
<short>
|
|
<var>TDataSetCancel</var> cancels the current edit mode for a
|
|
<var>DataSet</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDataSetCancel</var> is a <var>TDataSetAction</var> descendant which
|
|
cancels the current edit mode for a dataset record in its DataSource. This
|
|
includes restoring the values in records to their pre-editing content,
|
|
updating the record display, and removing any edit mode(s) assigned to the
|
|
State property in the dataset. TDataSetCancel can be added to an action list
|
|
and assigned to controls which perform the corresponding action.
|
|
</p>
|
|
<p>
|
|
<var>TDataSetCancel</var> publishes the DataSource property which explicitly
|
|
declares the target for the database action. The DataSource may be determined
|
|
by examining a data-aware control which used the database action, and passed
|
|
an an argument to the UpdateTarget and HandlesTarget methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetFirst"/>
|
|
<link id="TDataSetLast"/>
|
|
<link id="TDataSetNext"/>
|
|
<link id="TDataSetPrior"/>
|
|
<link id="TDataSetRefresh"/>
|
|
<link id="TDataSetDelete"/>
|
|
<link id="TDataSetEdit"/>
|
|
<link id="TDataSetInsert"/>
|
|
<link id="TDataSetPost"/>
|
|
<link id="TDataSetAction"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDataSetCancel.ExecuteTarget">
|
|
<short>
|
|
Retrieves the dataset for the target datasource and calls its Cancel method.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetCancel.ExecuteTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetCancel.UpdateTarget">
|
|
<short>
|
|
Enables or disables the action based on the state of the dataset in the
|
|
target.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateTarget</var> is an overridden method which enables or disables the
|
|
database action based on the state of the dataset in the <var>Target</var>
|
|
object.
|
|
</p>
|
|
<p>
|
|
<var>UpdateTarget</var> calls the <var>GetDataSet</var> method to retrieve
|
|
the dataset in the Target datasource. The action is <var>Enabled</var> when
|
|
the dataset is active, and the value in its <var>State</var> property is in
|
|
the <var>dsEditModes</var> set. This ensures that the action cannot be
|
|
performed for a dataset that has not been opened, or has not been placed in
|
|
edit mode.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetCancel.UpdateTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetCancel.DataSource" link="#lcl.dbactns.TDataSetAction.DataSource"/>
|
|
|
|
<element name="TDataSetDelete">
|
|
<short>
|
|
<var>TDataSetDelete</var> deletes the current record in the
|
|
<var>DataSet</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDataSetDelete</var> is a <var>TDataSetAction</var> descendant which
|
|
deletes the current record in the dataset for the target DataSource.
|
|
</p>
|
|
<p>
|
|
Delete behavior is dependent on the underlying database engine. Datasets
|
|
using the DBF engine simply mark a record for deletion; it is not physically
|
|
removed until the database engine packs the storage structure. Other
|
|
datasets, such SQL-based ones, may require that changes be committed before
|
|
they are flushed to the database engine.
|
|
</p>
|
|
<p>
|
|
<var>TDataSetDelete</var> publishes the <var>DataSource</var> property which
|
|
explicitly declares the target for the database action. The DataSource may be
|
|
determined by examining a data-aware control which used the database action,
|
|
and passed an an argument to the <var>UpdateTarget</var> and
|
|
<var>HandlesTarget</var> methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetFirst"/>
|
|
<link id="TDataSetLast"/>
|
|
<link id="TDataSetNext"/>
|
|
<link id="TDataSetPrior"/>
|
|
<link id="TDataSetRefresh"/>
|
|
<link id="TDataSetCancel"/>
|
|
<link id="TDataSetEdit"/>
|
|
<link id="TDataSetInsert"/>
|
|
<link id="TDataSetPost"/>
|
|
<link id="TDataSetAction"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDataSetDelete.ExecuteTarget">
|
|
<short>
|
|
Retrieves the dataset for the target datasource and calls its Delete method.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetDelete.ExecuteTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetDelete.UpdateTarget">
|
|
<short>
|
|
Enables or disables the action based on the state of the dataset in the
|
|
target.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateTarget</var> is an overridden method which enables or disables the
|
|
database action based on the state of the dataset in the Target object.
|
|
</p>
|
|
<p>
|
|
<var>UpdateTarget</var> calls the <var>GetDataSet</var> method to retrieve
|
|
the dataset in the Target datasource. The action is Enabled when the dataset
|
|
is active, is not positioned at the beginning- or end-of-file, and contains
|
|
<b>True</b> in its <var>CanModify</var> property. This ensures that the
|
|
action cannot be performed for a dataset that has not been opened, or when
|
|
the current record cannot be modified.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetDelete.UpdateTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetDelete.DataSource" link="#lcl.dbactns.TDataSetAction.DataSource"/>
|
|
|
|
<element name="TDataSetEdit">
|
|
<short>
|
|
<var>TDataSetEdit</var> edits the current record in the <var>DataSet</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDataSetEdit</var> is a <var>TDataSetAction</var> descendant which edits
|
|
the current record in the dataset for the target DataSource. TDataSetEdit
|
|
ensures that the dataset is placed in edit mode (when available) by calling
|
|
the Edit method for the dataset. Edit behavior is dependent on the underlying
|
|
database engine.
|
|
</p>
|
|
<p>
|
|
<var>TDataSetEdit</var> publishes the DataSource property which explicitly
|
|
declares the target for the database action. The DataSource may be determined
|
|
by examining a data-aware control which used the database action, and passed
|
|
an an argument to the UpdateTarget and HandlesTarget methods.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetFirst"/>
|
|
<link id="TDataSetLast"/>
|
|
<link id="TDataSetNext"/>
|
|
<link id="TDataSetPrior"/>
|
|
<link id="TDataSetRefresh"/>
|
|
<link id="TDataSetCancel"/>
|
|
<link id="TDataSetDelete"/>
|
|
<link id="TDataSetInsert"/>
|
|
<link id="TDataSetPost"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDataSetEdit.ExecuteTarget">
|
|
<short>
|
|
Retrieves the dataset for the target datasource and calls its Edit method.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetEdit.ExecuteTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetEdit.UpdateTarget">
|
|
<short>
|
|
Enables or disables the action based on the state of the dataset in the
|
|
target.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateTarget</var> is an overridden method which enables or disables the
|
|
database action based on the state of the dataset in the Target object.
|
|
</p>
|
|
<p>
|
|
<var>UpdateTarget</var> calls the <var>GetDataSet</var> method to retrieve
|
|
the dataset in the Target datasource. The action is Enabled when the dataset
|
|
is active, contains <b>True</b> in its <var>CanModify</var> property, and the
|
|
value in its <var>State</var> property is in the <var>dsEditModes</var> set.
|
|
This ensures that the action cannot be performed for a dataset that has not
|
|
been opened, has not been placed in edit mode, or the current record cannot
|
|
be modified.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetEdit.UpdateTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetEdit.DataSource" link="#lcl.dbactns.TDataSetAction.DataSource"/>
|
|
|
|
<element name="TDataSetInsert">
|
|
<short>
|
|
<var>TDataSetInsert</var> inserts (appends) a new record into the
|
|
<var>DataSet</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDataSetInsert</var> is a <var>TDataSetAction</var> descendant which
|
|
inserts a new record into the dataset for the target DataSource. The new
|
|
record has blank values in each of its fields, and allows editing of the
|
|
field values.
|
|
</p>
|
|
<p>
|
|
Positioning of the inserted record is actually determined using the
|
|
facilities for the underlying database engine. In most cases, the record is
|
|
simply appended to its data store and ordered using the indexing facilities
|
|
for the database engine. Some database engines require an additional step to
|
|
make the record insertion and/or field editing permanent; i.e. SQL databases
|
|
require use of a COMMIT statement to flush the changes to the database engine.
|
|
</p>
|
|
<p>
|
|
TDataSetInsert calls the <var>Insert</var> method for the target dataset to
|
|
perform the database action.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetFirst"/>
|
|
<link id="TDataSetLast"/>
|
|
<link id="TDataSetNext"/>
|
|
<link id="TDataSetPrior"/>
|
|
<link id="TDataSetRefresh"/>
|
|
<link id="TDataSetCancel"/>
|
|
<link id="TDataSetDelete"/>
|
|
<link id="TDataSetEdit"/>
|
|
<link id="TDataSetPost"/>
|
|
<link id="TDataSetAction"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDataSetInsert.ExecuteTarget">
|
|
<short>
|
|
Retrieves the dataset for the target datasource and calls its Insert method.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetInsert.ExecuteTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetInsert.UpdateTarget">
|
|
<short>
|
|
Enables or disables the action based on the state of the dataset in the
|
|
target.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateTarget</var> is an overridden method which enables or disables the
|
|
database action based on the state of the dataset in the Target object.
|
|
<var>UpdateTarget</var> calls the <var>GetDataSet</var> method to retrieve
|
|
the dataset in the Target datasource. The action is Enabled when the dataset
|
|
is active. No other conditions are checked for the dataset. This ensures that
|
|
the action cannot be performed for a dataset that has not been opened.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetInsert.UpdateTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetInsert.DataSource" link="#lcl.dbactns.TDataSetAction.DataSource"/>
|
|
|
|
<element name="TDataSetPost">
|
|
<short>
|
|
<var>TDataSetPost</var> posts changes for the current record to the
|
|
<var>DataSet</var>.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>TDataSetPost</var> posts editing changes for the current record into the
|
|
<var>DataSet</var>. Some datasets may require additional actions for editing
|
|
changes to become permanent; i.e. SQL databases use transactions that require
|
|
a <b>COMMIT</b> statement to be executed before changes are written to the
|
|
database engine.
|
|
</p>
|
|
</descr>
|
|
<seealso>
|
|
<link id="TDataSetFirst"/>
|
|
<link id="TDataSetLast"/>
|
|
<link id="TDataSetNext"/>
|
|
<link id="TDataSetPrior"/>
|
|
<link id="TDataSetRefresh"/>
|
|
<link id="TDataSetCancel"/>
|
|
<link id="TDataSetDelete"/>
|
|
<link id="TDataSetEdit"/>
|
|
<link id="TDataSetInsert"/>
|
|
</seealso>
|
|
</element>
|
|
|
|
<element name="TDataSetPost.ExecuteTarget">
|
|
<short>
|
|
Retrieves the dataset for the target datasource and calls its Post method.
|
|
</short>
|
|
<descr/>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetPost.ExecuteTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetPost.UpdateTarget">
|
|
<short>
|
|
Enables or disables the action based on the state of the dataset in the
|
|
target.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
<var>UpdateTarget</var> is an overridden method which enables or disables the
|
|
database action based on the state of the dataset in the Target object.
|
|
</p>
|
|
<p>
|
|
<var>UpdateTarget</var> calls the <var>GetDataSet</var> method to retrieve
|
|
the dataset in the Target datasource. The action is Enabled when the dataset
|
|
is active, and its State contains a value in the dsEditModes set. This
|
|
ensures that the action cannot be performed for a dataset that has not been
|
|
opened, or has not been placed in edit mode.
|
|
</p>
|
|
<p>
|
|
Please note that UpdateTarget does not check the values for fields in the
|
|
current record to determine if they have actually been altered.
|
|
</p>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
<element name="TDataSetPost.UpdateTarget.Target">
|
|
<short>DataSource object examined in the method.</short>
|
|
</element>
|
|
|
|
<element name="TDataSetPost.DataSource" link="#lcl.dbactns.TDataSetAction.DataSource"/>
|
|
|
|
<element name="Register">
|
|
<short>
|
|
Registers components for use in the Lazarus IDE.
|
|
</short>
|
|
<descr>
|
|
<p>
|
|
The following components are registered but not displayed on the Lazarus IDE
|
|
component palette:
|
|
</p>
|
|
<ul>
|
|
<li>TDataSetFirst</li>
|
|
<li>TDataSetLast</li>
|
|
<li>TDataSetNext</li>
|
|
<li>TDataSetPrior</li>
|
|
<li>TDataSetRefresh</li>
|
|
<li>TDataSetCancel</li>
|
|
<li>TDataSetDelete</li>
|
|
<li>TDataSetEdit</li>
|
|
<li>TDataSetInsert</li>
|
|
<li>TDataSetPost</li>
|
|
</ul>
|
|
</descr>
|
|
<seealso/>
|
|
</element>
|
|
|
|
</module>
|
|
<!-- DBActns -->
|
|
</package>
|
|
</fpdoc-descriptions>
|