Page 1 of 1

Problem Expecting float actual string - quite urgent!

Posted: 20.10.2005, 18:25
by zippo
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? :cry: 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.

Posted: 21.11.2005, 18:22
by tomazeli
I have the same problem, this poblem started when I change to mySQL 5 and updated to zeos 6.5.1

Please help us!!!!???? It's Urgent!!!

Same here - In depth

Posted: 13.07.2006, 21:29
by niofox
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 :shock:


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 ...