about trigger of SQL Server

K

kevin jin

Hi,

I did read Andrew's article about SQL Server trigger.

After a 'Insert' trigger is fired,is there any way we can modify newly
added data in virtual 'Insert' table before put them to the database?

Thanks!

Kevin Jin

DEVBuilder.org, http://www.DEVBuilder.org
ASP,ASP.NET,VB.NET,PHP,Java,and SQL Support, all in one place.
 
B

Bob Barrows

kevin said:
Hi,

I did read Andrew's article about SQL Server trigger.

After a 'Insert' trigger is fired,is there any way we can modify newly
added data in virtual 'Insert' table before put them to the database?

Depending on your version of SQL Server, and the type of trigger you are
using, you will usually find that a trigger fires AFTER the insert is
complete.Even if there was an inserted table before the insert took place,
there is no way to see its contents in ASP, outside of looking at the data
you are passing to the insert query from your asp page.

You should post followups to a SQL Server group.

HTH,
Bob Barrows
 
A

Aaron Bertrand - MVP

If you are using SQL Server 2000, you can use an INSTEAD OF trigger. This
will cancel the INSERT and let you do what you want... the INSERT will not
happen, however, so you will need to code that manually within the trigger.

Maybe you could give a better idea of your requirements, because there are
probably other ways to accomplish what you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top