PxPlus User Forum

Twitter Twitter Twitter

Author Topic: mysql read / key position  (Read 1314 times)

Jeffrey Ferreira

  • Diamond Member
  • *****
  • Posts: 188
  • I must have taken a wrong turn at Albuquerque.
    • View Profile
mysql read / key position
« on: August 18, 2020, 04:53:26 PM »
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


  • Diamond Member
  • *****
  • Posts: 124
    • View Profile
Re: mysql read / key position
« Reply #1 on: August 18, 2020, 05:21:54 PM »
Issue the read as SQL rather than fighting the emulation.

Devon Austen

  • Administrator
  • Diamond Member
  • *****
  • Posts: 387
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: mysql read / key position
« Reply #2 on: August 19, 2020, 08:05:53 AM »
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.