[fpc-devel] MySQL 5.1 and Double (trouble)

LacaK lacak at zoznam.sk
Wed Jul 20 13:22:42 CEST 2011


Andrew Brunner  wrote / napĂ­sal(a):
> On Mon, Jul 11, 2011 at 3:02 AM, Mark Morgan Lloyd
> <markMLl.fpc-devel at telemetry.co.uk> wrote:
>   
>>> 1.) Update Value                  : 40734.825668912039
>>> 2.) Actual Value after update :     40734.8256689120
>>> 3.) Actual Value on read       :    40734.825668912003
>>>       
>> Does MySQL come with an "official" program that you can use to run queries
>> manually? What happens when you use it to store and retrieve that number?
>>     
>
> 1.) is a value declared as double and viewed under GDB.
> 2.) is a value viewed in table data in MySQL Console App under Linux.
> 3.) Is the value retrieved from the table by the Application using the
> Select statement and Fields.FieldByName(field_name).AsFloat()
>
> I am still experiencing this issue and seeking alternatives b/c I'm
> using all 12 digits - and am expecting all 12 digits.  Can someone
> update the (Fields.Data variant as double) with a binary send instead
> of converting to a string?
>   
IMO it will require use in mysqlconn.inc new API "prepare family" 
functions introduced in MySQL 5
http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statement-function-overview.html

In current implementation (backward compatible with older MySQL 
versions) there is no only problem with sending values, but also 
retrieved values are strings (see 
http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html)

-Laco.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110720/bcbc07dc/attachment.html>


More information about the fpc-devel mailing list