Differences between Valentina 1 and 2
Ruslan Zasukhin
sunshine at public.kherson.ua
Wed Nov 8 23:22:59 CST 2006
On 11/8/06 11:12 PM, "Carsten Friehe" <rblists at online.de> wrote:
Hi Carsten,
I still cannot catch full picture if your problems.
>> You can either create a method field that is equal to boolean field
>> (which should give you 0 or 1 in it) and use that field for select or
>> convert boolean to byte in the database scheme for all uses.
>
> I created a method field inside the table but it didn't worked:
> StatByte = new VByte("StatByte", EVFlag.fNone, "if(Stat, 1, 0)")
Why you need this method?
Note that v2 can do EXPRESION right in the SELECT or WHERE clause
SELECT if(Stat, 1, 0)
So no need create methods for tmp expressions like we did this in v1.
Still can be good idea create methods if you need them often or use want
have index on that expression.
> I have 162 records with 12 records where Stat is set to True and 150
> records where Stat is set to False. But StatByte is always set to 0.
> I created onother method which calculates something which is based on a
> long value and this one works without a problem:
> StatByte = new VByte("StatByte", EVFlag.fNone, "if(Longvalue = 3, 1, 0)")
>
> Also this select is working:
> select longvalue, if(longvalue = 3, 1, 0) from A
> 1, 0
> 2, 0
> 3, 1
> 4, 0
> 5, 0
>
> But this one not:
> select booleanvalue, if (booleanvalue, 1, 0) from A
> True, 0 (in ViSQL you see "1, 0")
> False, 0
> or this one:
> select booleanvalue, if(booleanvalue = true, 1, 0) from A
> True, 0
> False, 0
> select booleanvalue, if(booleanvalue = 1, 1, 0) from A
> True, 0
> False, 0
>
> Is it possible that V4RB 2.5b12 has a problem with boolean-fields?
We do not see problems in our tests. So they works.
May be you have discover new bug: methods around boolean value ...
Send us your test database please,
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list