[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'db' (#fcl)

TParam

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Parameter description class

Declaration

Source position: db.pas line 1684

type TParam = class(TCollectionItem)

protected

  procedure AssignParam();

  procedure AssignTo(); override;

  function GetAsBoolean;

  function GetAsCurrency;

  function GetAsDateTime;

  function GetAsFloat;

  function GetAsInteger;

  function GetAsLargeInt;

  function GetAsMemo;

  function GetAsString;

  function GetAsVariant;

  function GetDisplayName; override;

  function GetIsNull;

  function IsEqual();

  procedure SetAsBlob();

  procedure SetAsBoolean();

  procedure SetAsCurrency();

  procedure SetAsDate();

  procedure SetAsDateTime();

  procedure SetAsFloat();

  procedure SetAsInteger();

  procedure SetAsLargeInt();

  procedure SetAsMemo();

  procedure SetAsSmallInt();

  procedure SetAsString();

  procedure SetAsTime();

  procedure SetAsVariant();

  procedure SetAsWord();

  procedure SetDataType();

  procedure SetText();

  function GetAsWideString;

  procedure SetAsWideString();

public

  procedure Create();

  

Create a new parameter value

  procedure Assign(); override;

  

Assign one parameter instance to another

  procedure AssignField();

  

Copy value from field instance

  procedure AssignToField();

  

Assign parameter value to field

  procedure AssignFieldValue();

  

Assign field value to the parameter.

  procedure AssignFromField();

  

Copy field type and value

  procedure Clear;

  

Clear the parameter value

  procedure GetData();

  

Get the parameter value from a memory buffer

  function GetDataSize;

  

Return the size of the data.

  procedure LoadFromFile();

  

Load a parameter value from file

  procedure LoadFromStream();

  

Load a parameter value from stream

  procedure SetBlobData();

  

Set BLOB data

  procedure SetData();

  

Set the parameter value from a buffer

  property AsBlob: TBlobData; [rw]

  

Return parameter value as a blob

  property AsBoolean: Boolean; [rw]

  

Get/Set parameter value as a boolean value

  property AsCurrency: Currency; [rw]

  

Get/Set parameter value as a currency value

  property AsDate: TDateTime; [rw]

  

Get/Set parameter value as a date (TDateTime) value

  property AsDateTime: TDateTime; [rw]

  

Get/Set parameter value as a date/time (TDateTime) value

  property AsFloat: Double; [rw]

  

Get/Set parameter value as a floating-point value

  property AsInteger: LongInt; [rw]

  

Get/Set parameter value as an integer (32-bit) value

  property AsLargeInt: LargeInt; [rw]

  

Get/Set parameter value as a 64-bit integer value

  property AsMemo: String; [rw]

  

Get/Set parameter value as a memo (string) value

  property AsSmallInt: LongInt; [rw]

  

Get/Set parameter value as a smallint value

  property AsString: String; [rw]

  

Get/Set parameter value as a string value

  property AsTime: TDateTime; [rw]

  

Get/Set parameter value as a time (TDateTime) value

  property AsWord: LongInt; [rw]

  

Get/Set parameter value as a word value

  property Bound: Boolean; [rw]

  

Is the parameter value bound (set to fixed value)

  property Dataset: TDataSet; [r]

  

Dataset to which this parameter belongs

  property IsNull: Boolean; [r]

  

Is the parameter empty

  property NativeStr: String; [rw]

  

No description available

  property Text: String; [rw]

  

Read or write the value of the parameter as a string

  property Value: Variant; [rws]

  

Value as a variant

  property AsWideString: WideString; [rw]

  

Get/Set the value as a widestring

published

  property DataType: TFieldType; [rw]

  

Data type of the parameter

  property Name: String; [rw]

  

Name of the parameter

  property NumericScale: Integer; [rw]

  

Numeric scale

  property ParamType: TParamType; [rw]

  

Type of parameter

  property Precision: Integer; [rw]

  

Precision of the BCD value

  property Size: Integer; [rw]

  

Size of the parameter

end;

Inheritance

TParam

  

Parameter description class

|

TCollectionItem

|

TPersistent

|

TObject

Description

TParam is one item in a TParams collection. It describes the name (TParam.Name), type (ParamType) and value (TParam.Value) of a parameter in a parametrized query or stored procedure. Under normal circumstances, it should never be necessary to create a TParam instance manually; the TDataset descendent that owns the parameters should have created all necessary TParam instances.

See also

TParams

  

A collection of parameter values for SQL-based datasets

The latest version of this document can be found at lazarus-ccr.sourceforge.net.