Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-01-16 : 23:15:24
|
Zach writes "Dear Sqlteam,
Great Site,
I am developing a large Web App that needs to track changes on tables. So that the "log" table would contain:
recordid of record changed (always identity column) id of user who performed change datestamp name of table type of transaction on table. ex: Update or Insert
Is there a way to setup a trigger to record this information automatically in sql server, so i don't have to alter the 10,000 lines of code i have done already, or is there a simple way of calling the stored procedure from inside of the sql insert/update statements that are coded already?
Also, in inserts, is there an easy way to grab the identity and pass it to the stored procedure in the same db call? (I have the code that you posted on grabbing the @@identity in the same call as the insert)
The flip side to this of course is that I need to write an app for the server that retrieves all updated/new records and put them into a text file for ftp'n.
I would greatly appreciate some direction on where to go for a better solution.
Sql Server 7.0, NT 4-sp 4 or 5 (soon Win2k)
Zach" |
|
|
|
|
|