Groups | Blog | Home
all groups > inetserver asp general > november 2003 >

inetserver asp general : about trigger of SQL Server


Bob Barrows
11/20/2003 1:08:53 PM
[quoted text, click to view]

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
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Aaron Bertrand - MVP
11/20/2003 1:24:40 PM
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.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/




[quoted text, click to view]

kevin jin
11/20/2003 5:22:45 PM
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
AddThis Social Bookmark Button