PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → WM22 HreadseekFirst not working on Android 6.0
WM22 HreadseekFirst not working on Android 6.0
Started by DW, Mar., 20 2018 3:44 PM - 1 reply
Posted on March, 20 2018 - 3:44 PM
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
Posted on March, 20 2018 - 4:19 PM
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