• 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: Out of order SQL statements?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Out of order SQL statements?


  • Subject: Re: Out of order SQL statements?
  • From: Sacha Michel Mallais <email@hidden>
  • Date: Thu, 23 Feb 2006 13:11:49 -0800

On Feb 23, 2006, at 1:06 PM, John Huss wrote:

I've got a Master-Detail edit page where the user can add and delete detail records. One of the detail fields has a UNIQUE constraint on it.

If I delete a detail record and then add a new one with the same unique key and save, it causes a constraint violation in the database. Looking at the generated SQL, it is executing the INSERT before the DELETE, even though the delete happened first. Why is this happening?

What database are you using? Some databases can defer asserting the constraints until commit. That's probably what you want. Alternatively, there is a WO api that allows you to manually order the SQL operations.



sacha


-- Sacha Michel Mallais Knowledge Broker Global Village Consulting Inc. http://www.global-village.net/ PGP Key ID: 7D757B65 AIM: smallais -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GCS d- s++:++ a C++(++++)$ UB@+++(++++)$ P-(---) L+(-) E>++ W++(+++) N+ o? K? w(---) O M++ V-(--) PS+++ PE(-) Y+ PGP++ t+ 5+ X+ R+>+++ tv+ b+ DI+++ D++ G e++ h(+) r* y+(*) ------END GEEK CODE BLOCK------



_______________________________________________
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: Out of order SQL statements?
      • From: Chuck Hill <email@hidden>
References: 
 >Out of order SQL statements? (From: "John Huss" <email@hidden>)

  • Prev by Date: Out of order SQL statements?
  • Next by Date: Re: Out of order SQL statements?
  • Previous by thread: Out of order SQL statements?
  • Next by thread: Re: Out of order SQL statements?
  • Index(es):
    • Date
    • Thread