Thanks for reply !  

I also do it using the sqlite3_trace hook but when you have a database with a
bunch of foreign keys it would be a lot easier/faster if sqlite could tell us
exactly where it was (sqlite must know it to flag the error).  

I already found the problem but it took 3 hours to find.  

Cheers !  
>  Mon Apr 04 2016 10:17:00 PM CEST from "Tim Streater"
><tim at clothears.org.uk>  Subject: Re: [sqlite] FOREIGN KEY constraint failed
>
>  On 04 Apr 2016 at 17:36, Domingo Alvarez Duarte
><sqlite-mail at dev.dadbiz.es> wrote: 
> 
>  
>>Fair enough !
>> 
>> But even then could it have let's say a place for record the last foreign
>>key
>> violation ?
>> 
>> Only one place will be better than nothing, it can be overwritten every
>>time
>> a foreign key is found and at least we could have a message like this:
>> 

>  You can write your own wrapper to do this. I have 850 places in my app
>where I do query or exec, so in the event of failure I need to know which one
>and what the sql was. When a problem occurs I log this information.
> 
> --
> Cheers -- Tim
> 
>   (, 0 bytes) [View| Download]
>  ?
>
>  
>
>  
>
>  



?

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 
URL: 
<http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/attachments/20160404/b120d769/attachment.ksh>

Reply via email to