Data.Bind.DBScope.TCustomBindSourceDB.EmptyDataLink

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
Data.Bind.DBScope.pas
Data.Bind.DBScope.hpp
Unit: Data.Bind.DBScope
Parent: TCustomBindSourceDB

Delphi

procedure EmptyDataLink;

C++

void __fastcall EmptyDataLink();

Description

Clears BufferCount in the DataLink connection.

You can use the EmptyDataLink method together with EmptyDataSet.

Example

The following example shows how to clear the data set and fill it with values every time the user clicks the button. This example uses the following components: TClientDataSet and TBindSourceDB with LiveBindings.

procedure TForm1.Button1Click(Sender: TObject);
begin
  ClientDataSet1.DisableControls;
  ClientDataSet1.EmptyDataSet;
  BindSourceDB1.EmptyDataLink;
  for I := 0 to 1000 do
    ClientDataSet1.AppendRecord([i * 111, i * 222]);
  ClientDataSet1.EnableControls;
end;

See Also