Subject | Re: [IBO] TIBOQuery & n-tier updates |
---|---|
Author | constantijnw |
Post date | 2004-06-14T11:37:49Z |
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
yes, FLD1 and PAR2 have the same name.
> At 10:41 AM 14/06/2004 +0000, you wrote:Yes.
>
> >I use sp's for IBOQuery selects and updates:
> >
> >Select:
> >SELECT FLD1, FLD2, .. FROM SEL_RECS(:PAR1);
> >PAR1 is included in the Params property and works just fine.
> >PAR1 doesn't equal any fieldname (it's a where conditions string).
> >
> >Delete:
> >EXECUTE PROCEDURE DEL_REC(:PAR2);
> >PAR2 is the PK which is also included in the selected fieldlist.
>
> Is 'PAR2' the name of the primary key?
> If, let's say, the output fieldnameYou mean: output fieldname of the select (SEL_RECS)? In that case:
> is 'FLD1'...then the DeleteSQL property should be:
yes, FLD1 and PAR2 have the same name.
>It doesn't. But also BeforeDelete isn't called. Why?
> EXECUTE PROCEDURE DEL_REC(:FLD1)
>
> Then, the dataset will pass the value of the PK to the DeleteSQL at the
> appropriate time and you don't have to worry about it.
> The same goes for EditSQL and InsertSQL: use the Fieldnames of thedataset
> for the corresponding parameterised pieces of your EXECUTE call.the
>
> >Whatever I try, PAR2 isn't assigned the proper value (remains NULL).
> >I've included PAR2 in the Params property. I've assigned PAR2 a value
> >in the BeforeDelete event handler. In the monitor I see that DEL_REC
> >is executed, but the BeforeDelete event is not fired.
>
> The Params property contains the Params of the SELECT procedure, not
> DeleteSQL statement. Just correct the parameter name in the executeAre you certain that IBOQuery and DataSetProvider are fully compatible?
> statement and you'll find it will work fine.