Subject | Re: [IBO] Re: BeforePrepare and IBObjects 4.5 |
---|---|
Author | Gerard J.M.Houtenbos |
Post date | 2005-01-27T20:33:02Z |
Thanks for answering my question.
On Wed, 26 Jan 2005 15:02:12 +0000 (UTC), in egroups.ibobjects
you wrote:
assigning parameters, in stead of BeforePrepare?
Gerard
Gerard J.M. Houtenbos
DoubleWood Software
On Wed, 26 Jan 2005 15:02:12 +0000 (UTC), in egroups.ibobjects
you wrote:
>But it works in IBObjects 4.2 .....
>
>Hi Gerard!
>
>First of all, I never use TIBO components, just TIB_ components, so
>I'm not really qualified to answer.
>
>To me, assigning parameters in BeforePrepare sounds like assigning
>values to an object before creating it - i.e. something that doesn't
>work.
>I call prepare in order to make the dataset ready for assigningSo, in short you say that I should use the AfterPrepare for
>parameters etc, and before that's done, there is no place to put the
>values. Changing the SQL itself in BeforePrepare sounds fine -
>including assigning a constant to where you would otherwise have a
>parameter, but not assigning a value to a parameter that doesn't yet
>exist.
>
>My guess is that when IBO discovers ParamByName, it knows that it has
>to prepare the statement, tries to do so and discovers the ParamByName
>in the BeforePrepare yet again and so the loop is already started and
>continues until the memory is exhausted.
assigning parameters, in stead of BeforePrepare?
>I do appreciate it. Thanks.
>Now, if I remember correctly, the BDE (which TIBO tries to emulate)
>used to have persistent fields, and that is what makes me puzzled
>about my reasoning above and makes me question whether it in fact
>should be possible to use the BeforePrepare method to assign values to
>parametres. Since no-one has answered you, I still thought writing
>this answer would be better than continued silence.
Gerard
>_________________________
>Sorry for not having a solution or great explanation,
>Set
>
>--- In IBObjects@yahoogroups.com, Gerard J.M.Houtenbos wrote:
>> The problem I'm encountering is very easy to reproduce:
>>
>> Just make an new application with a TIBODatabase, a TIBOStoredProc
>> and a TButton component. The SP must point to a FireBird-SP with
>> input pararmeters. Give the parameters a value in the
>> BeforePrepare-event of the TIBOStoredProc and execute the SP with
>> the TButton. That will give a "Stack overflow" because it is called
>> many times!?
>>
>> If you give the parameters a value in the AfterPrepare-event then
>> all goes well.
>>
>> If I use version 4.2 all goes well also.
>
>
>
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>Yahoo! Groups Links
>
>
>
>
>
>
Gerard J.M. Houtenbos
DoubleWood Software