API:Data.DB.TDataSetField.Assign

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
Data.DB.pas
Data.DB.hpp
Unit: Data.DB
Parent: TDataSetField

Delphi

procedure Assign(Source: TPersistent); override;

C++

virtual void __fastcall Assign(System::Classes::TPersistent* Source);

Description

Copies the Value property from another field component or assigns another object to the field component.

Data.DB.TDataSetField.Assign inherits from Data.DB.TField.Assign. All content below this line refers to Data.DB.TField.Assign.

Copies the Value property from another field component or assigns another object to the field component.

Use Assign to copy the Value property from one field to another. The fields must have compatible data types.

When Source is another field object, Assign calls the AssignValue method, using the Source field's Value property. Calling Assign with the Source parameter set to nil (Delphi) or NULL (C++) assigns a blank value to the field component. Calling Assign with any other object type calls the inherited method, which allows assignment from objects that implement a TField object in their AssignTo method.

See Also