PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WM22 HreadseekFirst not working on Android 6.0
WM22 HreadseekFirst not working on Android 6.0
Iniciado por guest, 20,mar. 2018 15:44 - 1 respuesta
Publicado el 20,marzo 2018 - 15:44
Hello All,

I am sure I am doing something wrong but when I call hReadSeekfirst(Items,Barcode,sScanCode)

I get nothing reruns false.

changing that field type from string to Numeric it works.

The original field type was string 24 (Not Unicode) indexed

DW
Publicado el 20,marzo 2018 - 16:19
Hi Dennis,

it COULD be (nees testing) that the key was an ANSI string, and the sscancode a unicode one...

you can try by doing a unicodetoansi(sscancode) in your hreadseekfirst.

I find it a good idea to always declare my string EXPLICITELY and prefix them accordingly...
so instead of doing
sScanCode is string
I do
usScanCode is unicode string
or
asScanCode is ansi string

And I do the same thing for the items in the DB...

this way, if end up doing hReadSeekfirst(Items,asBarcode,usScanCode), I can easily see that I may have a type of variable problem.

This is particularly usefull when you share code between mobile and web/windows, where one default is unicode and the other is ansi. Relying on the default type becomes a VERY bad idea.

Best regards