RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TParameters.AddParameter Method

Adds a parameter to the collection.

Pascal
function AddParameter: TParameter;
C++
__fastcall TParameter AddParameter();

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";

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!