Re: Out of order SQL statements?
Re: Out of order SQL statements?
- Subject: Re: Out of order SQL statements?
- From: Dov Rosenberg <email@hidden>
- Date: Thu, 23 Feb 2006 16:21:41 -0500
- Thread-topic: Out of order SQL statements?
The DEFERRABLE clause is Oracle specific. SQL Server does not seem to have
an equivalent piece of functionality (which has given us some problems)
Dov
On 2/23/06 4:18 PM, "Chuck Hill" <email@hidden> wrote:
>
> On Feb 23, 2006, at 1:11 PM, Sacha Michel Mallais wrote:
>
>> 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.
>>
> Best to create the constraints as DEFERRABLE INITIALLY DEFERRED when
> you create the table. Barring that there should be a class to order
> these on www.wocode.com, or if not there, Project Wonder must have one.
>
> Chuck
>
--
Dov Rosenberg
Inquira Inc
370 Centerpointe Circle, ste 1178
Altamonte Springs, FL 32701
(407) 339-1177 x 102
(407) 339-6704 (fax)
email@hidden
AOL IM: dovrosenberg
_______________________________________________
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