Subject Re: [IBO] TIBOQuery & n-tier updates
Author constantijnw
> No, not at all. The IBODataset does that itself and it uses
> ExecuteImmediate. In the normal course of events, the IBODataset
> the UpdateSQL statements itself, using the KeyLinks to build the
> clause and populate the XSQLDAs.
> You only need to configure the property explicitly where you have to
> custom SQL to perform the operation - as is perhaps your situation
here -
> it's necessary for joined sets that need more than one table
updated, for
> example. If you only want one table from a joined set to be
updated, you
> can use the KeyRelation property to tell IBO which table, and you
> need custom SQL unless you have something special to do.
> Just put your parameterised UpdateSQL in the relevant property
> InsertSQL, DeleteSQL) of the provider. Make sure you have the
> KeyLinks set. You'll save some code if the parameter names match
> KeyLinks names. If the names are mismatched, or you want to
intervene in
> some special way, e.g. to do some kind of validation, you'll have to
> the parameter values yourself in the Before event.
> >In that case I'm interested to learn
> >how to implement the AParam parameter of type PXSQLDA of the
> >ExecuteImmediate method (recommended by Jason in message 25390).
> This is necessary only if you have to call ExecuteImmediate in your
> code. If you have a dog, you don't need to bark yourself...
> The API Guide explains usage and data and where the XSQLDA
structures fit
> into the big picture. Probably the only way you're going to get
hold of
> this is to track through the code to see the declarations and how
the code
> instantiates, populates and uses an XSQLDA record. Start in
> and work through IB_Components.pas.
> If you decide to walk this rarefied path, a Howto article would be
> accepted. :-)
> Helen

Hi Heleen,

I use sp's for IBOQuery selects and updates:

PAR1 is included in the Params property and works just fine.
PAR1 doesn't equal any fieldname (it's a where conditions string).

PAR2 is the PK which is also included in the selected fieldlist.

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.