1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913
|
<?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>
|