Re: [sqlite] Problem getting trigger to work

2009-07-18 Thread Simon Slavin
Quick note: Please do not set 'reply-to' like that when using a discussion list. It's important if a question is posted to the list, answers to it get posted to the list. This is so that if the first answer to a question is wrong, someone else can see it and post a correction. It also

Re: [sqlite] Problem getting trigger to work

2009-07-18 Thread Kees Nuyt
On Fri, 17 Jul 2009 23:46:31 -0700, "Jim Showalter" wrote: > >It's an update. > >The Java code for my DataAccessor (a lightweight wrapper over >Android's wrapper over SQLite) checks the ID. If the ID is set to -1, >it's an insert, otherwise it's an update. > >A Word

Re: [sqlite] Problem getting trigger to work

2009-07-18 Thread Jim Showalter
lt;slav...@hearsay.demon.co.uk> To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> Sent: Friday, July 17, 2009 11:00 PM Subject: Re: [sqlite] Problem getting trigger to work > > On 18 Jul 2009, at 4:32am, Jim Showalter wrote: > >> create table words

Re: [sqlite] Problem getting trigger to work

2009-07-18 Thread Simon Slavin
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

[sqlite] Problem getting trigger to work

2009-07-17 Thread Jim Showalter
I have this simple schema: 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