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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the current value and old value in a trigger procedure 1

Status
Not open for further replies.

Aseem1234

Programmer
Nov 26, 2003
33
0
0
US
Hello,

I have a stored procedure for the update on one of my tables:

PROCEDURE updCaseInfo
local x, y

IF (cst_statid) < 0
messagebox("The error will be logged!")
x = alltrim(str(oldval("cst_statid", "cases")))
y = alltrim(str(curval("cst_statid", "cases")))

insert into systemevents(se_user, se_date, se_comment) values ("Aseem", datetime(), "Status was not a valid number: changed to " + y + " from " + x)

ENDIF
endproc

When I look at the information entered in the systemevents table, the old value and new value are the same and they are both the old value. How do I get the new value entered by the user?

Thanks
 
x = alltrim(str(cst_statid))
y = alltrim(str(curval("cst_statid", "cases")))



boyd.gif

[sub]craig1442@mchsi.com[/sub][sup]
&quot;Whom computers would destroy, they must first drive mad.&quot; - Anon​
[/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top