3 Replies Latest reply on May 13, 2011 5:17 PM by Drew747

    SQLite: how to handle SELECT errors when no record exists

    Kristin95762 Level 1

      Hi

       

      I want to search my table to see if a record exists. Currently, if the record doesn't exist my program just bombs, which is expected, but how do I handle this exception?

       

      Does ON CONFLICT/OR only work for update and insert functions? Maybe that's the route I need to take. I just can't find any code online that would give me a hint how to use it.

       

      In my program I want to insert an author and a book, but I only want to insert the author if it is not already in my authors table. In any case, I want to insert the book.

       

      Thanks

       

      Kristin