Hello everybody,,
I'm developing a web application using ASP.NET and i'm new in databse (basic knowledge:) ) ,,and i have to create a table that stores any changes made in the database tables includes (insert,update and delete) ,,i googled about how to do it and i found many articles about how to use triggers ,,but :( i dont know how to do it,,i tried to create triggers but the problem is how to make it visible,,so i can put it in a web page using gridview??

I use sql server 2000>>
I ask you guys to help me do it:icon_idea: ,,,just put me in the right way step by step:-/ ,,

Thnk you all for help

Re: how to create ......? 80 80

Not the easiest task if you are just starting out, but here's the concept.

You can create a table with the same structure and use it for auditing. Use the triggers to catch the insert,update, and deletes and then store the records into the second table as well.

Or you can create a single table for all changes and record them, composing dynamic statements on the fly.

Then you can create an aspx page like normal, and select from the audit table.

If you have very few tables and just starting out, i would suggest the first route. It really depends on how you are wanting to display and if you are wanting to query the data back. If you need any further explanation feel free.

Here's a link of something similar.

Re: how to create ......? 80 80

Thanx dickersonka,,i read the article and it was s0o helpfull,, now i can create triggers (^_^)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.