Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread How do you make sure
Sat, Aug 8 2009 4:00 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Very simple After Insert script on a table to update a second table

BEGIN

EXECUTE IMMEDIATE 'UPDATE MailBoxes SET _OnFile = _OnFile + 1 WHERE _BoxNo = '+CAST(NEWROW._fkMailBoxes AS VARCHAR);

END

How, in a multi user environment do you make sure it gets executed. In Delphi I'd simply add a loop and a try..except block to make sure. Is that approach the best one for triggers or is there a better way?

Roy Lambert
Mon, Aug 10 2009 2:27 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< How, in a multi user environment do you make sure it gets executed. In
Delphi I'd simply add a loop and a try..except block to make sure. Is that
approach the best one for triggers or is there a better way? >>

I assume that you're talking about a possible row lock issue ?  If so, then
you would simply hande the exception (1005) in a BEGIN..EXCEPTION block and
use an outer WHILE loop to keep trying until it succeeds.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image