TParamsItems (C++)
Description
This example requires a TClientDataSet and a button on a form.
Code
void __fastcall TForm1::Button1Click(TObject *Sender)
{
for (int I = 0; I < CDS->Params->Count; I++)
{
if (CDS->Params->Items[I]->IsNull &&
CDS->Params->Items[I]->DataType == ftInteger)
CDS->Params->Items[I]->AsInteger = -1;
}}
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
CDS->LoadFromFile(GetCurrentDir() + L"/../CDS.XML");
CDS->Params->CreateParam(ftInteger, "StateParam", ptInput);
CDS->Params->CreateParam(ftInteger, "MyParam", ptInput);
}
Uses
- Data.DB.TParams.Items ( fr | de | ja )
- System.Classes.TCollection.Count ( fr | de | ja )
- Data.DB.TParam.DataType ( fr | de | ja )
- Data.DB.TParam.IsNull ( fr | de | ja )
- Data.DB.TParam.AsInteger ( fr | de | ja )