Subject | [IBO] Re: IB_ComboBox as parameters |
---|---|
Author | clatu_earth |
Post date | 2006-05-11T09:27:42Z |
Yes, now I got things clear (I guess ;)
I just have to figure out some way to put the param expression in the
where clause of the query, on response to the choosing of a value from
the combo, which on it's side won't let anything to be chosen until
the param expression be in the where clause... a pretty good deadlock! :o)
The problem is that in the initial state of the form, neither combo
will be used as filter. Then one of them may be used, and then the
other one, and none will previously be in the query.
Well, I'll have to use a different approach to get that behavior.
Thanks for the explanations!
Alexandre
I just have to figure out some way to put the param expression in the
where clause of the query, on response to the choosing of a value from
the combo, which on it's side won't let anything to be chosen until
the param expression be in the where clause... a pretty good deadlock! :o)
The problem is that in the initial state of the form, neither combo
will be used as filter. Then one of them may be used, and then the
other one, and none will previously be in the query.
Well, I'll have to use a different approach to get that behavior.
Thanks for the explanations!
Alexandre
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 05:57 PM 11/05/2006, you wrote:
>
> >Sorry I didn't express myself properly.
> >
> >I'm still talking about doing filtering with IB_Combos.
> >What happens is that the combo that should be working as a parameter
> >holder (since it has no DataField set, and has ParamName set) are
> >behaving like a simple data aware component.
>
> OK. We are going around and around a number of aspects here. Let's
> get the IB_Combobox/ParamName thing cleared up.
>
> IB_ComboBox is a data-aware component that is bound to a field in a
> dataset. Like several IBO controls, this control can be bound to a
> parameter of that dataset, instead of a field.
>
> Just as a field has to exist in the datasource dataset, in order to
> have a data-aware control bound to it, so a *parameter* has to exist
> in the datasource dataset, in order to have a data-aware control
bound to it.
>
> But, because *this* control is designed to allow a value to be
> selected for (in this case) the parameter it is bound to, the dataset
> must be in a Prepared state, with the named parameter available, to
> be ready to accept a value for the parameter.
>
> So - the two things you need here are
>
> 1) The datasource query's statement, with a WHERE clause that
> contains the named parameter, e.g. ...'WHERE ID_CLASSE = :ID_CLASSE
>
> 2) The statement to be in a Prepared state
>
> Does that help?
>
> Helen
>