This is mt table Structure
[StudentIEPID] [int] IDENTITY (1, 1) NOT NULL ,
[StudentID] [int] NULL ,
[CurrentIEP] [bit] NULL ,
[IEPDate] [datetime] NULL
My goal is to insure that each student has only one current IEP.
This my trigger
This works fine in EM,QA,Adodb
But in Access Adp i get this error
Any Ideas
Thank You
[StudentIEPID] [int] IDENTITY (1, 1) NOT NULL ,
[StudentID] [int] NULL ,
[CurrentIEP] [bit] NULL ,
[IEPDate] [datetime] NULL
My goal is to insure that each student has only one current IEP.
This my trigger
Code:
ALTER TRIGGER SetCurrentIEP
ON StudentIEPs
FOR INSERT, UPDATE
AS
If UPDATE(CurrentIEP)OR UPDATE(studentid)
BEGIN
Update StudentIEPs set CurrentIEP=0
from StudentIEPs
inner join inserted on inserted.studentid=StudentIEPs.studentid and inserted.StudentIEPID<>StudentIEPs.StudentIEPID
and inserted.CurrentIEP=1
END
This works fine in EM,QA,Adodb
But in Access Adp i get this error
Key column informaion is insufficient or incorrect. Too many rows were affected by update
Any Ideas
Thank You