locked
SQLite question RRS feed

  • Question

  • User1324895001 posted

    We have built a project that runs a SQLite db for the backend stuff. Something we noticed while finishing up the project was issues with Boolean values.

    In one table we have 1 column that is set to Boolean as the type, our inserts are working and you can see when a record is inserted that the appropriate data is being inserted and stored. But when viewing the information on the page its always showing false. Now by accident we found out that if we go into the db and simply set and reset the Boolean value, when we revisit the page it shows correct.

    So even though our inserts are working, there is a manual step to have it reflect correctly.

    Can anyone offer suggestions on how to resolve this or things to try or check to see if we can fix this..

    Tuesday, February 24, 2015 4:32 PM

Answers

  • User1324895001 posted

    No need for replies, we found a article that states that even though there is a datatype of Boolean, its not handled as we expect like the other database applications.

    So we deal with the values before inserting and pass it in as 0/1 instead of false/true

    So far the test have shown correct.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 24, 2015 5:35 PM