First, please forgive any misplacement of this post. 1st time member.
Here we go:
Softpro version: std12, upgrade problem from std10.0.2
Backend: SqlServer
I have a trigger on UserTable06. (Listing below)
Trigger Summary:
The first time a record is added with a value for TX06CPDT and a firmfile number, add a record to another table (Trig01) with that value, the firmfile number, and the current timestamp.
In laymen's terms: Record forever the exact time/date the first time a proform user sets a value for TX06CPDT so I can query it using sql.
- - The trigger works when inserts are done manually,
- It DID work when the inserts were done by the data collector when we had std10.0.2. but not any more for the data collector inserts, failure beginning exactly when we upgraded to 12.
- I've tested the trigger by manually adding a row to UserTable06 after the upgrade to 12. It still works. Just not when the data collector does the insert.
- I can see records being inserted into UserTable06 by the data collector when TX06CPDT is set in proform, and proform is closed, but the trigger does not fire.
Please let me know it you have any thoughts on this.
THANK YOU in advance.
__________________________
Here's the trigger:
__________________________
CREATE TRIGGER updUserTable06
ON UserTable06
FOR update AS
IF UPDATE(TX06CPDT) -- i.e.if an update was done to this row
BEGIN
-- Checks if record already exists or not, to allow it to update or insert
IF NOT EXISTS (Select t.source
From Trig01 t
Join inserted ins
On t.Source = 'TX06CPDT'
And t.FirmFile = ins.FirmFile
Where t.Source = 'TX06CPDT'
And t.FirmFile = ins.FirmFile)
BEGIN -- Insert Record
-- Record does not exist, so lets insert a new one.
INSERT INTO Trig01 (Source, FirmFile, TX06CPDT)
SELECT 'TX06CPDT' Source, ins.FirmFile, getdate()
FROM inserted ins
END
END
__________________________