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

automatically update extended properties

Status
Not open for further replies.

AccessSQLUser

Programmer
Apr 23, 2001
101
US
Is there a way to automatically add or update the extended properties of an object (specifically stored procedures and functions) when the object is created or modified?
What I would like to do is update my extended property "LastModifiedBy" to be the user who last modified the object and to increase my extended property "VersionNum" by 1.
Could this be done?
 
Maybe triggers will help. John Fill
1c.bmp


ivfmd@mail.md
 
You could put the trigger on the sysobjects table. When it has an insert or update action, the trigger could run a stored procedure that executes sp_addextendedproperty or sp_updateextendedproperty. You could limit which objects are acted on by checking type and/or other attributes in the sysobjects table.

NOTE: This solution may not work if Microsoft changes the format of sysobjects. All documentation warns against accessing system tables directly. Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top