HMG3.6 and MySQL

Moderator: Rathinagiri

Post Reply
User avatar
serge_girard
Posts: 3286
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

HMG3.6 and MySQL

Post 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
There's nothing you can do that can't be done...
edk
Posts: 996
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: HMG3.6 and MySQL

Post by edk »

Hi. What you get with hb_ulen(aCurRow1:fieldGet(9)) and hb_utf8len(aCurRow1:fieldGet(9)) ?
User avatar
serge_girard
Posts: 3286
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HMG3.6 and MySQL

Post by serge_girard »

Hi Edward,

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

Serge
There's nothing you can do that can't be done...
User avatar
serge_girard
Posts: 3286
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HMG3.6 and MySQL

Post by serge_girard »

It looks like all fields len * 4...
There's nothing you can do that can't be done...
edk
Posts: 996
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: HMG3.6 and MySQL

Post by edk »

Try the test with a different libmysql.dll library
User avatar
serge_girard
Posts: 3286
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HMG3.6 and MySQL

Post by serge_girard »

Thx, I try tomorrow!
There's nothing you can do that can't be done...
User avatar
serge_girard
Posts: 3286
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HMG3.6 and MySQL

Post by serge_girard »

Edward,

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

Serge
There's nothing you can do that can't be done...
User avatar
serge_girard
Posts: 3286
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HMG3.6 and MySQL

Post by serge_girard »

Found out how to get file_info..
S
There's nothing you can do that can't be done...
Post Reply