Subject Re: [IBO] Digest Number 603
Author lobolo2000
Thanks Geoff,

I had rather in mind FieldByName being assigned to a variable.
So if MyColumn := Query.FieldByName('MyField'), will MyColumn be valid if
the current record changes, the query is reprepared, etc...?

Indeed, there are lots of very useful properties which are not explained in
the help files (or that I missed them).

BTW, I could not locate the OnCalculateFields event for IBOQuery (although
it exists in TQuery). A possible way might be to use that of the
InternalDataset. So my question: Can I set all the properties (like SQL,
FieldsXXXX...) and events (like OnCalculateField) of the InternalDataset and
work with the IBOQuery as usual?

I made a posting earlier that got no reply:
If I set a TIB_DateTimePicker to handle a parameter, and do not set
AlwaysSearch to True, is it normal that every time the date is changed
through the picker the dataset enters edit state?

Finally, what value can be used as default for a time field to mean NOW (as
'today' is for DATE fields)?


Original Message
> For how long does the reference to
> IB_DSQL1.ParamByName('P1') hold? I recall
> reading somewhere something about it lasting
> long enough for something to be
> done. Poor ol' memory.

The reference remains valid until the dataset has been unprepared.

This allows you to setup useful column references even at the
form/component level and initialise/clear the references using either
the statechanged or preparedchanged event handlers.

If you are into writing your own components, IBOs datalink even
receives setParamRefsChanged and setFieldRefsChanged events. So you
can derive your own datalink to interesting things with column


Geoff Worboys
Telesis Computing

Do You Yahoo!?
Get your free @... address at