Hi All,
I recently started development on an application using Powerbuilder and 
Mysql, and quickly discovered a frustrating problem.
Most of my database tables are based on integer keys, and therefore, most 
datawindows I design have numeric retrieval arguments.   The problem is, 
powerbuilder converts these arguments to scientific notation, and because of 
this, any key larger than 9 does not get properly matched.
   ie - when I try and retrieve a datawindow based on a key of 12, I trace 
the following SQL -
  select last_name from customer where customer_key = 1.20000000+e01

I have tried messing around with the settings in both Powerbuilder and 
MyODBC, to no avail.  I HAVE, however, come up with the following fix (for 
all of you who may have this same problem) - In your datawindow SQL painter, 
use the ROUND function to round your retrieval argument to the nearest 
integer.  This seems to work fine for everything I have tested.
   ie - select last_name from customer where customer_key =
           round(:a_customer_key)

I was wondering - am I the only one to have these problems?  Is there 
another known solution so I don't have to modify SQL code?  I would 
appreciate any knowledge anyone has concerning this interesting (bug?).

Thanks to all who reply,
Brad


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to