Subject Re: [IBO] Design question
Author Helen Borrie
At 01:28 PM 2/08/2006, you wrote:
>Hello
>
> Ib04.6b
> fb2.0rc3
> d2006
>
> I am redesigning an old application in preparation of the
> fb 2.0 release.
> On one form there are about 30 Tib_storedproc components which
> are used to retrieve values for display in tedit , tib_edit or
> tib_currency controls.
> My idea is to get rid of this Tib_storedproc components and
> replace them with tib_dsql components.

It needs to be clearly understood that you don't use tib_dsql for
running SPs that are designed to return (and subsequently display)
data. Use a proper SELECT statement for selectable SPs. Use
TIB_DSQL for executable SPs. If you don't understand the difference,
now would be the perfect time to find out.

> The question is should I use one tib_dsql component to do
> all the work or is something to be gained (in speed performance
> and memory requirement) if I use multiple tib_dsql components
> already preloaded with the respective code to call the stored
> procedures.

It depends on how you're using them. TIB_DSQL has very small
overhead compared to dataset components. If you have a number of
executable statements that take input parameters and/or could be run
randomly and often, you have little, if anything, to gain by creating
and destroying the statement object each time. On the other hand, if
you have something that is only needed rarely, then it makes sense to
put the whole operation into a method that creates and destroys the
statement object on demand.

Helen