Page 1 of 1

Problem with Float Field

Posted: Wed 07 Sep 2005 13:13
by RobertjanTuit
Hi,

I recently bought de DBExpress MYsql Drivers for Delphi.

I'm aom now having a problem when using datasetprovider.ApplyUpdates(0);
and a float Field with another value then NULL

The error it gives is :
"unable to find record. No key specified"

This happens only when the start Value is NOT NULL and NOT an rounded number, so when the start value has decomal numbers the update failed to whatever you try to change it.

Do you hav any idea what could be the problem ?

Withg Regards,
Robertjan Tuit

Using :
Delphi 7
mysql-server-4.1.10a-1

Posted: Wed 07 Sep 2005 15:48
by Ikar
If on modification or deletion the record the list of fields of WHERE clause has FLOAT fields, for example TSQLClientDataSe.UpdateMode = upWhereAll, the query can refresh no records. The cause of the problem is that FLOAT fields are stored on the server with low precision and couldn't be correctly compared with passed value.

Posted: Thu 08 Sep 2005 09:19
by RobertjanTuit
Ok I Understand,

Now i changed updateMode = upWhereKey,
I have a table with primary Key and have selected this primary key in the select.

I'm using tSQLQUery btw.

It gives another error now : "unable to find record. No key specified"
Even when i remove the Float Field from the select list.

Should i enter the Primary Key Somewehere the the DataSetPrivder or the TSQLQuery ?

Posted: Thu 08 Sep 2005 14:40
by Ikar
Do you have unique key fields in your query? If not then try to add them or set pfInKey flag in fields ProviderFlag property