• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Updating outside of the editing context using Oracle StoredProcedures
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updating outside of the editing context using Oracle StoredProcedures


  • Subject: Re: Updating outside of the editing context using Oracle StoredProcedures
  • From: "Wooddall-Gainey, David" <email@hidden>
  • Date: Thu, 28 May 2009 13:43:00 -0400
  • Thread-topic: Re: Updating outside of the editing context using Oracle StoredProcedures

Mike,

 

      Not sure what you mean scope of the changes. This method runs at the end of a WOLongResponsePage. At this point virtually all changeable data in the database has been changed and committed in the Oracle sps. Here I just want to save a timestamp and give control back to the user(s) with all data updated.

 

Thanks for your help.

 

 

      public WOComponent pageForResult(Object result) {

            Boolean myResult = (Boolean) result;

            boolean success = myResult.booleanValue();

 

            if (success) {

                  ec.refreshAllObjects();

                  dates.setDownloadDate(new NSTimestamp());

                  dates.setDownloadQtr(qtr);

                  dates.setDownloadFiscalYr(Integer.toString(yr));

                  ((Session) session()).setQuarter(qtr);

                  ((Session) session()).setYear(new Integer(yr));

                  ec.saveChanges();

                  return pageWithName("FBrowse");

            } else

                  return pageWithName("MyShamePage");

      }

 

or if you know the scope of the changes, it would be better to refetch them with refreshOnRefetch set to true ... less invasive than "all" ... definitely avoid invalidate if you can.

 

ms

 

On May 28, 2009, at 1:12 PM, Wooddall-Gainey, David wrote:



Hi,

                I have several stored procedures executed using EOUtilities as follows:

 

EOUtilities.executeStoredProcedureNamed(ec,"sf07UpdArData", args);

 

These procedures update most rows in most tables.

 

I assumed I had to either invalidateAllObjects in the ec or refreshAllObjects after the procedures run, then saveChanges to make the updates known in the ec.

 

Is this correct?

 

                Thank you.

 

David Wooddall-Gainey

AHNR-IT

540-231-5730

email@hidden

 

 

David Wooddall-Gainey

AHNR-IT

540-231-5730

email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Updating outside of the editing context using Oracle StoredProcedures
      • From: Mike Schrag <email@hidden>
  • Prev by Date: WOResourceManager exception under Windows
  • Next by Date: Re: Updating outside of the editing context using Oracle StoredProcedures
  • Previous by thread: Re: WOResourceManager exception under Windows
  • Next by thread: Re: Updating outside of the editing context using Oracle StoredProcedures
  • Index(es):
    • Date
    • Thread