Accueil → WINDEV 24 → "Null" Value in data base (MySql)
"Null" Value in data base (MySql)
Débuté par THEWORLDASGARP, 29 oct. 2018 10:15 - 2 réponses
Membre enregistré
88 messages
Posté le 29 octobre 2018 - 10:15
Has anyone already worked on the "Null" problem?

When writing to a file a "Null" value, windev returns a 0 (zero).

So the database expects a" nul"l value, and a zero is sent, the database (in my case "MySql") causes program crash.

Thanks for your advices.
Membre enregistré
12 messages
Posté le 01 novembre 2018 - 12:17
Yes. Tackled this just recently. To write NULL to MySql (rather than 0 or an empty string) use the following syntax.

Table.Item..NULL = True
Membre enregistré
88 messages
Posté le 05 novembre 2018 - 11:28
Ok, thanks Stephen.

But my problem is more complex.

I explain:

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 the statement "Table.Item..Null = True / False".

I do not know. Is it valid for all bases? (SQLserver, DB2 / 400 ...)

Thanks for your advices.