Save 
Join IIUG
 for   
 

Informix News
29 July 09 - Wall Street Journal - IBM to Acquire SPSS, Adding to Acquisitions... Read
11 February 09 - InformationWeek - IBM Drifts Slowly Toward Mainstream Cloud Computing... Read
11 February 09 - CNNMoney.com - IBM to Deliver Software via Cloud Computing With Amazon Web Services... Read
07 January 09 - Huliq News - IBM Power Servers Helps Bank of Chengdu Build Up Core Banking System.. Read
04 December 08 - Steeleye - Multicarta achieves 99.997% uptime for its Informix-based Credit Card Authorization Centre... Read
16 October 08 - VendorRate - Informix Earns Top Customer Satisfaction Score on VendorRate in Q3... Read
14 August 08 - IIUG.org - Sellout Expected for the 2009 IIUG Informix Conference... Read
29 April 08 - IntelligentEnterprise.com - IBM Informix Upgrade Enhances Clustering, Database Management... Read
29 April 08 - itweek.com - IBM 'Cheetah 2' mauls data costs... Read
28 April 08 - eWeek.com - IBM Uncages Cheetah 2 Data Server... Read
28 April 08 - CNNMoney.com - IBM Helps Clients Reduce Data Management Costs With New Informix Dynamic Server... Read
09 April 08 - CNNMoney.com - MediaSpan Embeds IBM Informix Dynamic Server Software for Delivering News to Print, Web and Wireless Devices... Read
08 April 08 - IT-Director.com - Informix seeks developers... Read
18 February 08 - marketwire.com - Icarus Studios Partners With IBM to Upgrade Performance, Availability for Its Online Games... Read
17 January 08 - eWeek.com - IBM Adds Mac Support to IDS for Higher Education... Read
17 January 08 - informationweek.com - Lotus Notes For iPhone Signals Closer Ties Between IBM, Apple... Read
16 January 08 - marketwire.com - IBM Informix Dynamic Server to Deliver Support for Mac OS X... Read
16 January 08 - internetnews.com - IBM's IDS to Support Mac Platform... Read
28 June 07 - REG Developer - IBM and Informix tie down Cheetah... Read
27 June 07 - CBRonline.com - IBM corrects its own Informix customer figures... Read
14 June 07 - vnunet.com - IBM changes spots with Informix 'Cheetah' database... Read
14 June 07 - eChannelLine - IBM expands scope for IDS... Read
14 June 07 - Resellernews - IBM: Informix database alive and kicking... Read
13 June 07 - DB2 Magazine - Cheetah is now out of the gate... Read
12 June 07 - IBM - IDS 11 release announcement (pdf)... Read
12 June 07 - ChannelWeb Network - IBM Uncages IDS 11, Aka Cheetah, Database... Read
12 June 07 - eWeek.com - IBM's 'Cheetah' Ready to Pounce... Read
12 June 07 - InformationWeek - IBM Unleashes 'Cheetah' Database... Read
12 June 07 - WebWire - IBM Strengthens Database Portfolio With New Informix Dynamic Server... Read
12 June 07 - Intelligent Enterprise - IBM Unveils Informix Upgrade... Read
12 June 07 - ComputerWeekly.com - IBM's Cheetah IDS makes leap to better data centre clustering... Read
12 June 07 - ebiz - IBM Unveils Next Generation Informix Dynamic Server... Read
12 June 07 - computerworld.com - Will 'Cheetah' help IBM's Informix chase down market share?... Read
12 June 07 - Internetnews.com - No Data Can Outrun This 'Cheetah'... Read
12 June 07 - de.internet.com - IBM neuer Datenbank-Server mit Codenamen Cheetah ist fertig... Read
12 June 07 - verifox.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - golem.de - Informix 11 vorgestellt... Read
12 June 07 - Computerwoche.de - IBM stellt neue Informix-Version vor... Read
12 June 07 - IBM.de - IBM stärkt Datenbank-Portfolio mit neuem Informix Dynamic Server... Read
12 June 07 - Heise - IBM gibt Informix 11 frei... Read
25 May 07 - Taiwan.CNET.com - Local Taiwan Informix user group established... (Chinese language) ... Read
18 May 07 - ChannelWeb Network - IBM Musters Partners For Cheetah Release... Read
18 May 07 - eWeek.com - IBM Looks to 'Cheetah' to Speed Up Blade Servers... Read
7 May 07 - DB2 Magazine - SQL Shortcuts - Use these tricks to generate IDS SQL scripts... Read


End of Support Dates

[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

IDS Forum

Re: Pre-insert trigger that stops the insert.

Posted By: Art Kagel
Date: Tuesday, 6 January 2009, at 11:15 a.m.

In Response To: Re: Pre-insert trigger that stops the insert. (rroussey@comcast.net)

Unless he defers constraint checking to commit time, then the delete and
insert will have occurred before the check.

Art

On Mon, Jan 5, 2009 at 10:39 PM, rroussey@comcast.net
<rroussey@comcast.net>wrote:

> If your 'option 1' is within the scope of a single tx, it will error as
> usual.
> The delete will not have been completed when the insert occurs.
>
> --
> Bob
>
> -------------- Original message --------------
> From: "Jarrod Teale" <Jarrod.Teale@fonterra.com>
>
> > Hi,
> > Does anyone know how to create a trigger and stored procedure that stops
> > an insert from occuring if it is a duplicate, while returning success?
> >
> > We have a client that can't cope with getting a -239 error when there is
> > a duplicate record on the unique index. This client needs to treat the
> > -239 as "everything is okay" but other errors should still raise the
> > error.
> > So, what I tried was to create a trigger and procedure that looked at
> > the row coming in, checked the target table to see if the primary key
> > exists and if it does, stop the insert from proceeding and just return
> > "all ok".
> > Working out if there is a duplicate is easy - but then stopping the
> > insert from proceeding or overriding the -239 code that comes back seems
> > much more difficult (hence the question).
> >
> > Options I have considered are:
> > 1. Use the pre trigger to delete the record that will cause the clash
> > and let the insert proceed
> > 2. Use a dummy table that the insert goes into, then a trigger on that
> > table moves the record over to the real table if there is no duplicate.
> >
> > Both will work, but the option to override the returned error code /
> > prevent the insert from running would be great - anyone know how?
> >
> > Informix IDS11.10.UC2W2
> >
> > Thanks
> >
> > Jarrod Teale
> >
> > Team Lead - Manufacturing Execution Systems
> >
> > Automation & Process Control Group
> >
> > NZ Technical
> >
> > Fonterra
> >
> > Fonterra Extn: 77525
> >
> > DDI: +64 7 850 7525
> >
> > Mobile: +64 21 968 364
> > fax: +64 7 849 7855
> > email: jarrod.teale@fonterra.com
> >
> >
> >
> >
>
> *******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
>
>
> *******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>

--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)

Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.

Messages In This Thread

[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

IDS Forum is maintained by Administrator with WebBBS 5.12.