Hi!
I have a problem with the "old" Zeos. An Query opening that always worked is not working anymore! I KNOW the field CENA_PROD is float, but Zeos insists that it's a string...
Here's the error, from the Delphi IDE
---------------------------
Debugger Exception Notification
---------------------------
Project Prodaja.exe raised exception class EDatabaseError with message 'qryZaloga: Type mismatch for field 'CENA_PROD', expecting: Float actual: String'. Process stopped. Use Step or Run to continue.
What can I do? Yes, I will migrate the project to 6.x, but first I have to patch it, so I won't be under pressure during the migration.
Problem Expecting float actual string - quite urgent!
Moderators: gto, cipto_kh, EgonHugeist
Same here - In depth
I get these problems alot. Both new and old versions of Zeos
Usually I have to remove the offending fields from the dataset, close all connections then add the fields back using 'Add All'.
This used to solve my problems, which usually only occured when I made data-type related changes to my database fields in mysql.
Now, however, I'm getting this problem when using a UNION or 2 in my queries, and I'm trying to figure out how to fix it myself.
I'm about to try using Cast functions to make all the data conform to the same type and hopefully this should solve the problem
EDIT:
Yep that worked. All the fields now come up as floats in both designtime and runtime. I used "CAST(field1 AS Unsigned) AS field1name"
Signed can work too. I dunno how you'd cast it to an integer tho ...
Usually I have to remove the offending fields from the dataset, close all connections then add the fields back using 'Add All'.
This used to solve my problems, which usually only occured when I made data-type related changes to my database fields in mysql.
Now, however, I'm getting this problem when using a UNION or 2 in my queries, and I'm trying to figure out how to fix it myself.
I'm about to try using Cast functions to make all the data conform to the same type and hopefully this should solve the problem
EDIT:
Yep that worked. All the fields now come up as floats in both designtime and runtime. I used "CAST(field1 AS Unsigned) AS field1name"
Signed can work too. I dunno how you'd cast it to an integer tho ...