BOOLEAN Values

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Aggie85
Posts: 95
Joined: Wed 11 Nov 2015 17:03

BOOLEAN Values

Post by Aggie85 » Wed 12 Jul 2017 01:36

Howdy!

I have a dataset with a BOOLEAN field called Enabled. There are 5 records in the table with Enabled = True

If I query the table with:

SELECT <Fields>
FROM <Table>
WHERE Enabled = 1

It returns 0 records.

If I query the table with:

SELECT <Fields>
FROM <Table>
WHERE Enabled = '1'

all 5 Enabled records are returned.

I read that SQLLITE stores BOOLEANS as an integer with values of 0/1. Why doesn't the first WHERE clause work?

How does VirtualQuery/SQLLITE combo map BOOLEAN fields?

Thanks,

Aggie85

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: BOOLEAN Values

Post by MaximG » Wed 12 Jul 2017 07:56

Thank you for the information. We investigated the described behavior using the data contained in the sent TestData.vtd file. Unfortunately, we didn't manage to reproduce the problem in our test environment. Please compose and send us via the e-support form ( https://www.devart.com the "Support"\"Request Support" menu) a small complete sample in which the problem occurs.

Aggie85
Posts: 95
Joined: Wed 11 Nov 2015 17:03

Re: BOOLEAN Values

Post by Aggie85 » Wed 12 Jul 2017 12:06

Good day Maxim,

The problem occurs on a Source DataSet that is of a TkbmMemTable. I will have to try it with a TVirtualTable and see if it works both ways.

Unfortunately, I use TkbmMemTable and I can't change that in my product.

Thanks,

Aggie85

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: BOOLEAN Values

Post by MaximG » Wed 12 Jul 2017 14:01

Unfortunately, we could not reproduce the described problem when using TkbmMemTable in our environment. For further investigation, please compose a small complete sample, during execution of which the problem occurs. This project should include TkbmMemTable usage. You can send this sample using the e-support form(https://www.devart.com - the "Support"\"Request Support" menu)

Aggie85
Posts: 95
Joined: Wed 11 Nov 2015 17:03

Re: BOOLEAN Values

Post by Aggie85 » Wed 12 Jul 2017 14:06

I will put together a C++ example showing the problem and upload it to y'all.

All the best,

Aggie85

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: BOOLEAN Values

Post by MaximG » Fri 14 Jul 2017 09:12

We will be waiting for your sample to continue the investigation

Post Reply