Hi Curt,

Thanks for the response.

> is it that neither log message below is actually written?
Both log messages are written but there is nothing in between.
>
> If so, then either the query  type is not 'select' when this method
> executes, or the method is not executing when you expect it to.
>
> Are you sure that the DO is bound at the page (top) level?
Yes.  The whole reason for this exercise is to modify 4 Sybase servers from
one keyclick.  The way I do this is to catch the transaction in
onBeforeExecuteEvent and then spread it to 4 other data objects.  I have to
do this in different ways.  For a delete, I simple extract the primary key
field/s, construct the delete SQL and do executeImmediates to 4 data
sources.  For Inserts and updates, things get a bit more complicated.  What
I do is what I call a "brain transplant".  I transfer every field from this
data object to 4 other data objects which I then execute appropriately.

All of this is working just fine.  The thing I am trying to correct is a
simple problem where the user wants to change what amounts to the primary
key.  Since we have no indexes on this table, it is entirely possible in SQL
to do this.  ND wants to use the new key in the dynamic criteria (not
unreasonable).  What I intended to do was simply save off the dynamic
criteria in a user session object and then restore it later (just for
updates).
>
> I don't use bound data objects, but I recall that if the DO is bound to a
> repeated on the page, the only  method that would fire would be
> repeated_onBeforeExecuteEvent, not this_.....  .
>
No repeated.  On this page we are displaying a single record in free form.
The data object is returning a single record.  The equivilent in SQL would
be, "Select * from TR_Labels_TIF where Bridge_Symbol = 'us;ibm' ".  My user
may want to change us;ibm to us;ibm1.


> -- Curt Springer,
>     Team ND
>
>
>
> At 06:56 PM 8/5/99 -0500, Roger Feeley wrote:
> >I just know that I have done something stupid.  I have a data object and
I
> >want to retrieve the dynamic criteria and store it in a user data session
> >object.  For some reason, I come up blank.  The log tells me nothing
other
> >than I didn't retrieve anything.  bStr comes up null.  Any ideas?
> >
> >public int this_onBeforeExecuteEvent(CSpDataObjectEvent event)
> >  {
> >     CSpMultiSQL doDest;
> >
> >     if(getExecutingQueryType() == SELECT_QUERY_TYPE)
> >     {
> >       CSpString bStr;
> >       CSpMultiSQL doSrc =  (CSpMultiSQL)CSpider.getDataObject
> >("doTIF_Edit");
> >       CSpLog.send(this, CSpLog.CRITICAL, "*****getting dynamic criteria
=");
> >       bStr = new
>
SpString( doSrc.getDynamicCriteria(CSpCriteriaSQLObject.JOIN_CRITERIA_TYPE))
> >;
> >       CSpLog.send(this, CSpLog.CRITICAL, "*****dynamic criteria =" +
bStr);
> >       CSpider.putUserSessionObject("sDynamicCriteriaSave", bStr);
> >       return (PROCEED);
> >     }
> >
> >
> >
> >_________________________________________________________________________
> >
> >For help in using, subscribing, and unsubscribing to the discussion
> >forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
> >
> >For dire need help, email: [EMAIL PROTECTED]
>


_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to