Page 1 of 1

HMG3.6 and MySQL

Posted: Fri Feb 14, 2025 1:03 pm
by serge_girard
Some strange behaviour I found...

I have a sql-field defined as CHAR(1) in my table.

When selecting it like this:

Code: Select all

 ? 'aCurRow1:fieldGet(9)',  aCurRow1:fieldGet(9), len(aCurRow1:fieldGet(9))
 ? 'trim aCurRow1:fieldGet(9)', alltrim(aCurRow1:fieldGet(9)), len(aCurRow1:fieldGet(9))
It should always give a CHAR(1) and LEN=1 as result but first result is LEN=4

Any idea somebody?

Serge

Re: HMG3.6 and MySQL

Posted: Fri Feb 14, 2025 8:21 pm
by edk
Hi. What you get with hb_ulen(aCurRow1:fieldGet(9)) and hb_utf8len(aCurRow1:fieldGet(9)) ?

Re: HMG3.6 and MySQL

Posted: Sat Feb 15, 2025 8:22 am
by serge_girard
Hi Edward,

Both suggestions give also LEN=4 !
Field with char(50) gives len=200.
latin1_swedish_ci

Serge

Re: HMG3.6 and MySQL

Posted: Sat Feb 15, 2025 9:07 am
by serge_girard
It looks like all fields len * 4...

Re: HMG3.6 and MySQL

Posted: Sat Feb 15, 2025 1:24 pm
by edk
Try the test with a different libmysql.dll library

Re: HMG3.6 and MySQL

Posted: Sat Feb 15, 2025 4:40 pm
by serge_girard
Thx, I try tomorrow!

Re: HMG3.6 and MySQL

Posted: Sun Feb 16, 2025 1:38 pm
by serge_girard
Edward,

Is it possible to retrieve version number libmysql.dll when running to program?

Serge

Re: HMG3.6 and MySQL

Posted: Mon Feb 17, 2025 10:34 am
by serge_girard
Found out how to get file_info..
S