mysql read / key position

Started by Jeffrey Ferreira, August 18, 2020, 04:53:26 PM

Previous topic - Next topic

Jeffrey Ferreira

Hi list (i feel like i saw something about positioning a key on mysql read) but i can't find in search.

i have a mysql keyword table
so keyword is 4015551212
when i read the table
read (keyword,key="4015551212",dom=*next)
the read positions the key to the record right after 4015551212
i found a hack way around it but i would like to fix...
can someone help me
jeff

Peter.Higgins

Issue the read as SQL rather than fighting the emulation.

Devon Austen

Look at the type and length of the key field in MySQL and make sure the key= matches. It could be that the key field expects leading zeros or trailing spaces to be an exact match.

Also make sure PxPlus know what the MySQL key is either via a KEY= on the open or a IOL=*. If there are multiple keys make sure you are using the correct one i.e. KNO=.

You can also turn on the '!Q' system parameter and you will get message boxes for all the SQL that PxPlus sends to the MySQL server. This may help you figure out why it isn't finding the exact record you are expecting.
Principal Software Engineer for PVX Plus Technologies LTD.