Hi List users,

In my code, i create two triggers (Trigger_A, Trigger_B) on a table (
sample_db), but after execution, it's found that Trigger_A is not executed
correctly ( old.msg_box hasnt be put into table log ). And it seems to me
that SqlLite invalids the OLD reference after it found it be referred in as
SET statement, so that it cant be get used by later triggers, or are there
else explanation for this?

Thanks,
-- Jarod

code snips as follows
A:
db.execSQL("CREATE TRIGGER Trigger_A + AFTER UPDATE OF msg_box ON sample_db
WHEN ( condition) +
                "BEGIN " +
                "  INSERT INTO Log ( old.msg_box )"
                "END;");
B:
db.execSQL("CREATE TRIGGER Trigger_B + AFTER UPDATE OF msg_box ON sample_db
WHEN ( condition) +
                "BEGIN " +
                "  UPDATE sample_db SET msg_box = -old.msg_box " +
                "  WHERE _id = old._id; " +
                "END;");


-- 
http://designforuse.blogspot.com/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to