I have the following trigger on a table
CREATE TRIGGER tr_orders_setFY ON [dbo].[orders]
FOR INSERT, UPDATE
AS
UPDATE orders SET fy = dbo.fn_leos_getFY(dtstamp) WHERE fy IS NULL
The problem is when I add a record using RS.AddNew() and retrieve the id of the last record added temp = RS("field") a number is not returned. When I remove the trigger everything works fine.
Any help will be greatly appreciated.
Thanks!
CREATE TRIGGER tr_orders_setFY ON [dbo].[orders]
FOR INSERT, UPDATE
AS
UPDATE orders SET fy = dbo.fn_leos_getFY(dtstamp) WHERE fy IS NULL
The problem is when I add a record using RS.AddNew() and retrieve the id of the last record added temp = RS("field") a number is not returned. When I remove the trigger everything works fine.
Any help will be greatly appreciated.
Thanks!