Re: [sqlite] getting offending constraint

2009-07-02 Thread Jean-Denis Muys
Wow, I have been on the internet since 1986, and I had never realized that this could be a problem. I am often guilty of the same, for lazyness reasons, as this is a convenient way to avoid having to reenter the to, cc, and bcc fields. I went back to James' original message, which my mail client

Re: [sqlite] getting offending constraint

2009-07-02 Thread Simon Slavin
On 2 Jul 2009, at 10:17am, Jean-Denis Muys wrote: But when I examine its raw headers, I found this one: In-reply-to: b537e3a60907011151q563194e5g184c8f2cbd68d...@mail.gmail.com Is this the header that made you point your finger? Yes, this header is how some mail clients understand

Re: [sqlite] getting offending constraint

2009-07-02 Thread P Kishor
On Thu, Jul 2, 2009 at 4:17 AM, Jean-Denis Muysjdm...@kleegroup.com wrote: Wow, I have been on the internet since 1986, and I had never realized that this could be a problem. I am often guilty of the same, for lazyness reasons, as this is a convenient way to avoid having to reenter the to, cc,

Re: [sqlite] getting offending constraint

2009-07-02 Thread James Gregurich
I dropped the constraint and added the trigger. strange. works as expected in the sqlite3 exe. in C code, I get constraint failed from sqlite3_errmsg. If I drop the trigger shown below, the C code has no constraint violation as would be expected which means the trigger is causing the

Re: [sqlite] getting offending constraint

2009-07-02 Thread Simon Slavin
On 2 Jul 2009, at 6:35pm, James Gregurich wrote: works as expected in the sqlite3 exe. in C code, I get constraint failed from sqlite3_errmsg. [...] CREATE TRIGGER trig BEFORE INSERT ON test1b BEGIN SELECT CASE WHEN (1) THEN RAISE(ABORT, 'no parent element') END; The language in

[sqlite] getting offending constraint

2009-07-01 Thread James Gregurich
howdy! Would there be a way to identify the offending constraint if SQLITE_CONSTRAINT is returned? sqlite3_errmsg is just telling me constraint failed...which is of limited usefulness. -James ___ sqlite-users mailing list

Re: [sqlite] getting offending constraint

2009-07-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James Gregurich wrote: howdy! You hijacked someone else's thread by hitting reply, rather than starting a new one. That is very poor netiquette. Would there be a way to identify the offending constraint if SQLITE_CONSTRAINT is returned?

Re: [sqlite] getting offending constraint

2009-07-01 Thread James Gregurich
How would I have hijacked a thread? I changed the subject and removed the original text. On Jul 1, 2009, at 12:32 PM, Roger Binns wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 James Gregurich wrote: howdy! You hijacked someone else's thread by hitting reply, rather than

Re: [sqlite] getting offending constraint

2009-07-01 Thread P Kishor
On Wed, Jul 1, 2009 at 3:39 PM, James Gregurichbayouben...@mac.com wrote: How would I have hijacked a thread?  I changed the subject and removed the original text. ... that is exactly how a thread is hijacked... changing the subject is not enough. Every message has a unique id that is used by

Re: [sqlite] getting offending constraint

2009-07-01 Thread James Gregurich
ah. I have no knowledge of how mailing list programs work. no poor etiquette was intended. On Jul 1, 2009, at 1:41 PM, P Kishor wrote: On Wed, Jul 1, 2009 at 3:39 PM, James Gregurichbayouben...@mac.com wrote: How would I have hijacked a thread? I changed the subject and removed the

Re: [sqlite] getting offending constraint

2009-07-01 Thread Simon Slavin
On 1 Jul 2009, at 8:19pm, James Gregurich wrote: Would there be a way to identify the offending constraint if SQLITE_CONSTRAINT is returned? sqlite3_errmsg is just telling me constraint failed...which is of limited usefulness. Instead of the constraint, you could define a trigger, and

Re: [sqlite] getting offending constraint

2009-07-01 Thread James Gregurich
thanks. I tried that, but I still got back constraint failed rather than my RAISE message. Since you say it should work, I probably did something wrong. I'll look at it again. On Jul 1, 2009, at 3:59 PM, Simon Slavin wrote: On 1 Jul 2009, at 8:19pm, James Gregurich wrote: Would there

Re: [sqlite] getting offending constraint

2009-07-01 Thread Simon Slavin
On 2 Jul 2009, at 1:57am, James Gregurich wrote: I tried that, but I still got back constraint failed rather than my RAISE message. Since you say it should work, I probably did something wrong. I'll look at it again. If you left the constraint definition in in your table definition then