[Overview][Constants][Types][Classes][Procedures and functions][Variables][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 1178

type TParam = class(TCollectionItem)

public

  constructor 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 AsBCD: Currency; [rw]

  

Get or set parameter value as BCD value

  property AsBlob: TBlobData; [rw]

  

Return parameter value as a blob

  property AsBoolean: Boolean; [rw]

  

Get/Set parameter value as a boolean value

  property AsBytes: TBytes; [rw]

  

Get or set parameter value as TBytes

  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 AsAnsiString: AnsiString; [rw]

  

Parameter contents as an ANSI string

  property AsUTF8String: UTF8String; [rw]

  

Parameter contents as an UTF8 string

  property AsUnicodeString: UnicodeString; [rw]

  

Parameter contents as a Unicode string

  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 AsFMTBCD: TBCD; [rw]

  

Parameter value as a BCD 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 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

  property Value: Variant; [rws]

  

Value as a variant

end;

Inheritance

TParam

  

Parameter description class

|

TCollectionItem

|

TPersistent,IFPObserved

|

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 parameterized 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


Documentation generated on: May 14 2021