Differences between Valentina 1 and 2

Carsten Friehe rblists at online.de
Wed Nov 8 22:12:45 CST 2006


Hi Robert!

>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)")

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?

Best Regards!
Carsten


More information about the Valentina mailing list