Menu

#157 7.1.4-Stable with SQLite Boolean field using Y/N instead 1/0

7.1.4-Stable
closed
2017-02-23
2016-05-05
No

I'm using ZeosLib 7.1.4-stable with RAD XE5.
I have a database SQLite 3 with Boolean fields (usually 0 for false and 1 for true). Using ZQuery or ZTable, the insertion of a new record or update an existing record in the boolean field ZeosLib insert or update with Y or N character. Is there a setting to change the character Y to 1 and N to 0? Is there a Bug Fix? This is a bug. . .

Discussion

  • EgonHugeist

    EgonHugeist - 2016-05-19

    Added a Parameter "BindOrdinalBoolValues=True/False" to the TZComponent-Properties to keep the behavior optional.
    Since the SQLite affinities also prefere 0/1 i do agree ... it is a bug. We may change the defaults on 7.3

    Patch done R3906 /testing-7.2 (SVN)

    please test and close the ticket

     
    • Eduardo Sejas

      Eduardo Sejas - 2016-05-24

      Hi,

      Are you referring to Properties in the components already installed (example: TZQuery, TZTable. . .) or change the installation packages and reinstall?

       
  • Eduardo Sejas

    Eduardo Sejas - 2016-06-27

    Hi,

    I tested R3906 /testing-7.2 (SVN) . . . the problem is occurring . .
    The Properties "BindOrdinalBoolValues=True/False" is present, but Y/N stay as values.

     
    • EgonHugeist

      EgonHugeist - 2017-02-23

      Can't reproduce it.
      Added second patch R3964 \tesing-7.2 tested and works fine.
      which now writes a Integer value. Note reading both kinds of Boolean expressions is supported by Zeos.

      Please test and close if ok.

      Hum now another question: Did you apply the "BindOrdinalBoolValues=True/False" as is or did you you use BindOrdinalBoolValues=True?

      Maybe you did understand me wrong..? just use:<YourZeosDataSet>.Properties.Values['BindOrdinalBoolValues'] := 'True';
      and everything works like you want to have it.

      Michael

       

      Last edit: EgonHugeist 2017-02-23
  • EgonHugeist

    EgonHugeist - 2017-02-23
    • status: open --> closed
    • assigned_to: EgonHugeist
     
  • EgonHugeist

    EgonHugeist - 2017-02-23

    Please reopen if you're unlucky..

     

Log in to post a comment.

MongoDB Logo MongoDB