error with float field
Posted: Sun 23 Dec 2007 01:08
Delphi 7.0
mydac 5.20.0.12 Pro.
SQL script:
All these values are shown not correctly after click on a refresh button, whose on click event is this:
And float values are shown as 49.4900016784668 and so on.
Is this a bug or how can I solve this problem? Thanks in advance.
mydac 5.20.0.12 Pro.
SQL script:
Code: Select all
CREATE TABLE IF NOT EXISTS `mydac` (
`id` int(11) NOT NULL auto_increment,
`price` float NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=5 ;
--
-- Daten für Tabelle `mydac`
--
INSERT INTO `mydac` (`id`, `price`) VALUES
(1, 23),
(2, 49.49),
(3, 100.01),
(4, 34.5);
Code: Select all
MyTable1.SQL.Text:= 'select * from '+MyTable1.TableName;
MyTable1.Prepare;
MyTable1.Execute;
Is this a bug or how can I solve this problem? Thanks in advance.