On 19 Aug 2010, at 8:10pm, David Bicking wrote:

> The way it is set up, if any of the updates/inserts done by the triggers 
> fail, everything rolls back, including the original data that caused the 
> triggers. What I want to happen is that while everything else gets rolled 
> back, Table1 still has its data, along with the error messages returned by 
> the triggers.
> 
> Nearest I can tell you can't do that with triggers, but I really don't 
> understand how they work, so maybe I am wrong.

You may be able to do this with ON CONFLICT and RAISE.  See

http://www.sqlite.org/lang_createtrigger.html

with special regard to those two constructions and see

http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers

for some examples.  However, a lot of work that's done with triggers is really 
about foreign keys, and SQLite now implements foreign keys so you don't have to 
simulate them in such a bulky way.  Read

http://www.hwaci.com/sw/sqlite/foreignkeys.html

before you get too into triggers.

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

Reply via email to