Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Trigger 1

Status
Not open for further replies.

robertfah

Programmer
Joined
Mar 20, 2006
Messages
380
Location
US
Would the following Trigger cause an indefinate loop?

Code:
CREATE TRIGGER ASC_BT_TRIG_AfterUpdateUserParams
ON USER_OPTIONS
AFTER UPDATE
AS
UPDATE USER_OPTIONS
SET 	UO_OPTION_ID = 1,
	UO_VALUE = 1
WHERE UO_SECTION_ID = 'AutoSpellCheckIssues'

Because the Trigger is on a table that is updating itself?

Basically I have a 3rd party program that I ahve access to the DB. I don't want users to have the option to select a certain 'User option', but they do. So to get around it, I was alway going to set the value to what I want it to with a trigger.
 
Normally it would not recurse. There is actually a setting that I do not remember the name of that you can set if you want the recursion.

djj
The Lord is My Shepard (Psalm 23) - I need someone to lead me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top