Subject Odp: [IBO] Checking Parameters Value - I'm stuck
Author Yagi
So, this code i put earlier:

for(int i = 0; i < ibqRaport->Params->ColumnCount; i++)
{
if(ibqRaport->Params->Columns[i]->IsNull)
{
Application->MessageBox(AnsiString("Give me a value of param " +
ibqRaport->Params->Columns[i]->FieldName + ".").c_str(),
Application->Title.c_str(), MB_OK | MB_ICONEXCLAMATION);
Abort();
}
}

should work but it's not, Why?

I try

if(ibqRaport->Params->Columns[i]->AsString.IsEmpty())

and the string is always empty. What am I doing wrong?

but ibqRaport->Params->Columns[i]->FieldName works OK.

Yagi


----- Wiadomość oryginalna -----
Od: "Geoff Worboys" <geoff@...>
Do: <IBObjects@yahoogroups.com>
Wysłano: 30 marca 2001 14:10
Temat: Re: [IBO] Checking Parameters Value - I'm stuck


> > How this line looks like in C++ Builder???
> > i try ibqRaport->Params[i]->AsString, ibqRaport->Params[i].AsString
> > and it's all wrong
>
> C++Builder has some trouble with the default property capabilities of
> delphi.
>
> TIB_Statement.Fields and TIB_Statement.Params actually return a
> reference to TIB_Row (as you will see from the online help). However
> the default property of TIB_Row is the Columns[] array property, which
> Delphi uses to enable shorter code.
>
> So in Delphi...
> Query.Fields[n] is shorthand for Query.Fields.Columns[n]
> and
> Query.Params[n] is shorthand for Query.Params.Columns[n]
>
> In C++Builder we must use the long version so they become...
> Query->Fields->Columns[n]
> and
> Query->Params->Columns[n]
>
>
> HTH
>
> Geoff Worboys
> Telesis Computing
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>