Data.Win.ADODB.TParameters.AddParameter

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: public
Source:
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Unit: Data.Win.ADODB
Parent: TParameters

Delphi

function AddParameter: TParameter;

C++

TParameter* __fastcall AddParameter();

Description

Adds a parameter to the collection.

Call AddParameter to create a single empty TParameter object and add it to the TParameters collection. All properties of the newly added TParameter object are either at their default value or are empty.



with ADOStoredProc1.AddParameter do begin
DataType := ftString;
..Direction := pdInput;
Value := 'malathion';
end;



int PCount;
ADOStoredProc1->AddParameter;
PCount = ADOStoredProc1->Parameters->Count - 1;
ADOStoredProc1->Parameters[PCount]->DataType = ftString;
ADOStoredProc1->Parameters[PCount]->Direction = pdInput;
ADOStoredProc1->Parameters[PCount]->Value = "malathion";



See Also