Question : Need an SQL Expres trigger to commmunicate w/ my ASP.NET website

I have not yet coded a trigger, but need on now.

My database is SQL Express and my platform is ASP.NET.

How do I do this?  Please show me how to make a simple trigger for the adition of a record to a table.

Thanks,
newbieweb

Answer : Need an SQL Expres trigger to commmunicate w/ my ASP.NET website

Here is a simple example
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
create table test(
 id int identity (1,1) not null primary key,
 someint int,
 triggerresult int
 )
 go
 create trigger testtrigger on test after insert, update as
 update test 
  set triggerresult = 2 * i.someint
  from test t
  join inserted i
  on i.id = t.id
 go
 
 insert into test (someint)
 select 5 union all
 select 100
 
 select * from test
Random Solutions  
 
programming4us programming4us