E_Fail status on decimal fields only resolved by changing decimal to float
am 07.01.2005 14:27:48 von Grant Davis------=_NextPart_000_0031_01C4F4BC.AE2277E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi
Synopsis: Decimal field caused e_fail status resoved only by changing to =
a float.=20
Originator: Grant Davis
Organization: Low Call S.A. (Spain)
MySQL support: [none]
Severity: [serious]
Priority: [medium]
How-To-Repeat:
SQL1.SQL.Add('SELECT SELECT * from calldata where custid=3D190 and =
calldate>=3D'2004-12-01' and calldate<=3D'2004-12-31');
SQL11.OPEN;
while not SQL1.eof do begin
.
.
.
(process data from SQL fields)
.
.
.
SQL1.next <<<<<<<<<<<< error occurs here with double digit numbers.
Fix: Change decimal fields to float
Class: [ sw-bug]
Release: mysql-3.23.38
Exectutable: [mysqld-shareware]
Environment: =20
System: Windows XP
Compiler: VC++ 6.0
Architecture: i
Description: I have a MYSQL database backing a Delphi application. The =
application imports raw call data from a telecom selling company. The =
cost of the phone call is calculated against a lookup table. So far so =
good. The cost of the call is written to a field typecast as decimal the =
width set variously to 5,6 10,10 etc to overcome an e_fail error when =
reading from the data using this SQL:
SELECT * from calldata where custid=3D190 and (date parameters here).
Entered into the console this worked and returned all valid data.=20
Using a Delphi ADOQUERY this would generate an error when reading calls =
which went into double digits.=20
As in:
SQL1.SQL.Add('SELECT SELECT * from calldata where custid=3D190 and =
calldate>=3D'2004-12-01' and calldate<=3D'2004-12-31');
SQL11.OPEN;
while not SQL1.eof do begin
.
.
.
(process data from SQL fields)
.
.
.
SQL1.next <<<<<<<<<<<< error occurs here with double digit numbers.
This was only resolved by changing the field to a float.=20
As a workaround this is not a good solution. I have several data aware =
grids (like tables) tied to the databse through an SQL filter. Instead =
of showing the cost price in regular decimal format the clerk is faced =
with large unmanagable figure on display. This workaround is proving a =
cosmetic problem rather than any other type.=20
ODBC 3.51
Server 4.0-16nt
Thank you for your help
Grant Davis
------=_NextPart_000_0031_01C4F4BC.AE2277E0--