PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WX21 - Fixed Length String
WX21 - Fixed Length String
Iniciado por guest, 23,jul. 2017 14:03 - 4 respuestas
Publicado el 23,julio 2017 - 14:03
Hi All

I have declared a fix length string as such:

MyString is string on 255

Has anyone done any brute force tests on passing data of greater length to a string declared with a fixed length, say X? Are there any gotchas or does it only pass the X number of characters? Any errors or failures that can be expected?

Cheers
André
Publicado el 23,julio 2017 - 19:28
In my experience with both flavours of HFSQL you can pass whatever length you like.
Not sure what it passes to the DB but it will truncate the stored value equal to the length declared in the analysis.

Other than embarrassment I have never had any issues.
Publicado el 23,julio 2017 - 20:54
Hi Derek

This is not a PCSoft DB. It is a string variable that the data is passed to. Will a string variable of fixed length 200 clip any data passed to it that is greater than 200?

Cheers
André
Publicado el 23,julio 2017 - 22:35
Quick test on Windev22:

[attachment 2397 Picture1.jpg]
Publicado el 24,julio 2017 - 01:48
Hi Igor

I am seeing the same results as well.

Cheers
André