Subject RE: [IBO]Parameter values in DeleteSQL
Author Jason Wharton
I'd like to get the original problem for this so that I can look into it
more.

I don't recommend that this be changed because it was in there for a good
reason.

Jason Wharton


> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of Paul Hope
> Sent: Tuesday, June 20, 2006 7:08 AM
> To: IBObjects@yahoogroups.com
> Subject: RE: [IBO]Parameter values in DeleteSQL
>
>
> Hi Calin
>
> Thankyou very much - that explains it well. I shall wait for
> the bug to
> fixed and work round it rather than change my source.
>
> Regards
> Paul
>
> > -----Original Message-----
> > From: IBObjects@yahoogroups.com
> > [mailto:IBObjects@yahoogroups.com] On Behalf Of Calin Pirtea
> > Sent: 16 June 2006 02:25
> > To: IBObjects@yahoogroups.com
> > Subject: RE: [IBO]Parameter values in DeleteSQL
> >
> > Hi Paul,
> >
> > > -----Original Message-----
> > > From: IBObjects@yahoogroups.com
> > > On Behalf Of Paul Hope
> > > My point is that it shouldn't be different.
> > > I'm guessing now . .
> > > When it processes a param assignment I assume it gives up
> after the
> > > first occurrence of the param name ignoring any duplicates?
> > > If this assumption is correct I would have thought it would
> > be a great
> > > improvement to get it to process any additional
> parameters with the
> > > same name.
> > >
> >
> > You are almost right in your guess.
> >
> > This is how it works.
> >
> > IBO will parse your statement and all parameters found are
> loaded in a
> > structure within IBO.
> >
> > This structure is then parsed again looking for duplicate parameter
> > names. All duplicates are combined in order to allow you to
> > use the same
> > parameter in different places (which works perfectly fine
> by the way).
> > The most important thing is for parameters to have the same type.
> >
> > When assigning parameter values to the API IBO will lookup
> their index
> > and find them in it's own parameter list.
> >
> > Now somewhere between combining duplicate parameters and
> > assigning their
> > values it has lost the second index for the API so when
> that index is
> > found in the API it cannot assign a value to it.
> >
> > This is a minor bug in IBO in my opinion but it is easy to avoid by
> > turning off the combineduplicate feature.
> >
> > This feature is automatically turned off for insert/edit/delete
> > statements that drive ib_query.
> >
> > This the place in the code where you have to change from
> > FCombineDuplicateParams := true; to FCombineDuplicateParams
> := false;
> >
> > ****
> > procedure TIB_UpdateSQL.PrepareCustomDML( ADSQL:
> TIB_Statement;
> > const ASQL: string );
> > var
> > ii: smallint;
> > tmpParam: TIB_Column;
> > tmpCol: TIB_Column;
> > tmpName: string;
> > ucName: string;
> > begin
> > with ADSQL do
> > begin
> > FCombineDuplicateParams := false;
> > ***
> >
> > I hope this helps answer your question.
> >
> > Cheers,
> > Calin.
> >