Data.Win.ADODB.TParameters.AddParameter

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AddParameter: TParameter;

C++

TParameter* __fastcall AddParameter();

Properties

Type Visibility Source Unit Parent
function public
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TParameters

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