469,943 Members | 2,483 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,943 developers. It's quick & easy.

about trigger of SQL Server

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.
Jul 19 '05 #1
2 3399
kevin jin wrote:
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
--
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.
Jul 19 '05 #2
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/


"kevin jin" <ke*******@itt.com> wrote in message
news:3f*********************@news.frii.net...
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.

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Scott CM | last post: by
2 posts views Thread by Dima Gofman | last post: by
7 posts views Thread by Shane | last post: by
1 post views Thread by DennBen | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.