On 18 Jul 2009, at 4:32am, Jim Showalter wrote: > create table words > ( > _id integer primary key autoincrement, > wordText text not null unique > ); > > I have triggers that work, which I got from > http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers. > > Now I'm trying to modify the update trigger to prevent saving a word > with the same ID but different text: > > create trigger ut_words_cannotChangeWordTextOnUpdate > before update on words > for each row > begin > select raise( > rollback, > 'update on table WORDS violates constraint > ut_words_cannotChangeWordTextOnUpdate') > where OLD.wordText <> NEW.wordText; > end;
What command are you using to make the modification ? Is it an INSERT or an UPDATE ? Have you tried executing the appropriate command in the sqlite3 command-line application ? Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users