Windev : "Null" Value in DataBase

312 Views Asked by At

I have a problem with Null Value.

I Explain. Here is the below code :

ChnToto is a chain

ChnToto = Null

On debugging, we find that Windev has stored a "0" (zero) in "ChnToto".

I totally lose the initial information (=> "Null").

How to force the compiler to keep this information without having to use the "Variant" type?

I feel that you have to go through a complex variable, or a class.

Thanks for your advices or ideas

2

There are 2 best solutions below

0
On

You must use the variant type if you want to handle the null value. In windev the string type handle 0 and null the same way. https://doc.windev.com/en-US/?1511015&verdisp=210

0
On

To assign Null Values in DataBase you have to use this syntax:

ChnToto..Null = True

Then use HModify(), HSave(), HAdd(), Etc.

Avoid ChnToto = null. That is an incorrect assignment of null