PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → WX21 - Fixed Length String
WX21 - Fixed Length String
Débuté par André Labuschagné, 23 juil. 2017 14:03 - 4 réponses
Posté le 23 juillet 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é
Posté le 23 juillet 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.
Posté le 23 juillet 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é
Posté le 23 juillet 2017 - 22:35
Quick test on Windev22:

[attachment 2397 Picture1.jpg]
Posté le 24 juillet 2017 - 01:48
Hi Igor

I am seeing the same results as well.

Cheers
André