Thanks again for the quick response.  Boy is my face red.  This is in a data
object in onBeforeExecuteEvent.  My hope was to confine as much of the
multi-server stuff to the data object so I could re-engineer the pages as I
liked.

I will try the getSource thing, but I don't hold out much hope since my
'brain transplant' code is working and for that to happen I would have to
have a good pointer to the data object.

Maybe it's time to open up a case?

Roger
Curt Springer <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I don't know for sure what is (not) going on.
>
> A couple of thoughts:
>
> 1.  I recall that there is some subtle difference between executing
> onBeforeDataObjectEvent at the page level, and between
onBeforeExecuteEvent
> on the data object itself.  Perhaps the page-level event executes before
> criteria are automatically set (just a guess).  In the absence of other
> suggestions, you might try moving the code from the page to the DO and see
> if there is any difference.
>
> 2.  I see that you are not using the reference to the data object that is
> contained in the event (available via getSource).  I always think it is
> less error-prone to do it that way, as you are assured that you have a
> reference to the object that is causing the event.  To eliminate any
> question, I would suggest something like:
>
> CSpMultiSQL doSrc =  (CSpMultiSQL) event.getSource();
> CSpLog.send(this, CSpLog.ERROR, " this_onBeforeExecuteEvent for
> DO:  "+doSrc.getName());
>
> Don't know if this helps at all, but it's all I can think of.
>
> -- Curt
>
>
>
> At 10:29 AM 8/6/99 -0500, Roger Feeley wrote:
> >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]
>


_________________________________________________________________________

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