While it's working I am getting back:

[error] SQL update failed

> good

But I am also seeing

Error performing trigger for customer 

> but It works the record is not updated

Write failure 
> good

Any idea on why I am getting the error performing trigger when it's obvious 
it's working?

Thanks

Dougc

<email signature>

There are 10 kinds of people in the world, those that know binary and those 
that do not.  Along the same lines there are those who know java and those who 
want to learn java ......

On Mar 31, 2011, at 11:55, Doug Chanco <d...@chancofamily.com> wrote:

> Thank you very much this was extremely helpful info
> 
> I have it working but does anyone besides me think the trigger info in the 
> sysdesc manual is not very helpful?
> 
> I did not see any reference to setdiagnostics and why is there no "pick 
> syntax" for working with triggers?
> 
> The SQL syntax works fine once you get used to it
> 
> Anyway thanks to everyone for their help and yes outside my world there are 
> those that do not like or want to
> Learn java ........
> 
> Dougc
> 
> <email signature>
> 
> There are 10 kinds of people in the world, those that know binary and those 
> that do not.  Along the same lines there are those who know java and those 
> who want to learn java ......
> 
> On Mar 30, 2011, at 20:29, "Boydell, Stuart" <stuart.boyd...@spotless.com.au> 
> wrote:
> 
>> If you want to force the trigger to issue a rollback I think you need to 
>> execute the SetDiagnostics function.
>> 
>> Something like...
>> subroutine TRIGGER.HANDLER(triggerName,schema,tableName,
>>                          event,eventTime,
>>                          newRecordID,newRecord,oldRecordID,oldRecord,
>>                          association,associationEvent,
>>                          triggerCount,chainCascade,cascade)
>> 
>> if someCheckCondition then
>> call updateThirdPartyApp(xxx, returnStatus)
>> if returnStatus < 0 then
>> *// rollback and gracefully end processing.
>> z = setDiagnostics('[999] Third Party App update failed with: ': 
>> returnStatus)
>> end
>> end
>> return
>> end
>> 
>> 
>> 
>> 
>> -----Original Message-----
>> From: u2-users-boun...@listserver.u2ug.org 
>> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Chanco
>> Sent: Thursday, 31 March 2011 03:05
>> To: U2 Users List
>> Subject: [U2] Trigger questions
>> 
>> I am sure I can do this but I am trying to figure out the best way ........
>> 
>> I need to write a WRITE trigger that does the following
>> 
>> Call a java web service to update an SQL table (no problem)
>> 
>> But if the update fails do NOT update the pick record and if possible notify 
>> the user
>> 
>> My question is what would be the best method/way to do this?
>> 
>> Do triggers use transaction logging that I could roll back the record or 
>> should I do something more manual? Copy the record (for example)
>> 
>> Any thoughts/suggestions/ideas welcomed and appreciated
>> 
>> Dougc
>> 
>> <email signature>
>> 
>> There are 10 kinds of people in the world, those that know binary and those 
>> that do not.  Along the same lines there are those who know java and those 
>> who want to learn java ......
>> _______________________________________________
>> U2-Users mailing list
>> U2-Users@listserver.u2ug.org
>> http://listserver.u2ug.org/mailman/listinfo/u2-users
>> 
>> 
>> 
>> _______________________________________________
>> U2-Users mailing list
>> U2-Users@listserver.u2ug.org
>> http://listserver.u2ug.org/mailman/listinfo/u2-users
> _______________________________________________
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to