• 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: Problem with commit while deleting rows from table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with commit while deleting rows from table


  • Subject: Re: Problem with commit while deleting rows from table
  • From: LD <email@hidden>
  • Date: Thu, 15 Jul 2004 00:50:43 +1000

Hi there,

On 14/07/2004, at 8:19 PM, Tanmoy Roy wrote:

Hi all,

I have a requirement where for any user updation I need to first delete some specific rows and then insert the fresh rows in the database. EOModeler does a AutoCommit whenever we are deleting or updating something in the database.

EOModeler or EOEditingContext?

But the scenario is if we have deleted some rows and during insertion some exception occurs then all our data will be lost. Is there a work around here ? Please note that the deletion step is essential here as well as the fresh insertion.

Doesn't EOF always attempt to turn off autocommit? The 5.2 release notes mention something about this. Have you overridden this?


java.lang.Object
  |
  +--com.webobjects.eoaccess.EOAdaptorContext
        |
        +--com.webobjects.jdbcadaptor.JDBCContext

Atomicity (the first test of ACID compliance) says "all or nothing". So, auto-committing in-between the two operations would not be helping you. EOEditingContext will do the work for you in normal circumstances... saveChanges() or revert() as needed.

myJDBCContext.connection().getAutoCommit() should be false prior to transaction, at least.
myJDBCContext.connection().setAutoCommit(false) if not...


HTH

with regards,

--
Lachlan Deck
(@yahoo.com.au)
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Problem with commit while deleting rows from table
      • From: Art Isbell <email@hidden>
References: 
 >Problem with commit while deleting rows from table (From: "Tanmoy Roy" <email@hidden>)

  • Prev by Date: Re: Using mod_rewrite
  • Next by Date: Re: Using mod_rewrite
  • Previous by thread: Problem with commit while deleting rows from table
  • Next by thread: Re: Problem with commit while deleting rows from table
  • Index(es):
    • Date
    • Thread