I have a problem with above combination...
Delphi 7, ZeosDbo (6.1.5 & 6.5.1) and MySql 4.1.
The problem is that if I put a whole number in float field, i can change it, but if i put a float number (eg. 6,35) the problem is that i can't change the value any more!!! And when in a field is whole number and i put a float number, it is changed but after that i cannot change the number!!
If i use any third party problem (Mentat MySql Turbo mamanger for eg.), i don't have that problem.
Where is the problem!?!?
Thx
P.S.
Sorry for multi posting :-(
--
That's all from Amos Sam
MySql, Float and ZeosDbo
Moderators: gto, cipto_kh, EgonHugeist
-
- Fresh Boarder
- Posts: 3
- Joined: 31.10.2005, 17:28
"whole number" = integer.therealkev wrote:Could you be more precise?
With "whole number" you mean integer?
Any ReadOnly-property (TZQuery/TZTable or TZConnection) set true?
Do you use TZQuery or TZTable?
Any SQL-statement in the TZQuery?
To be complete: please post the sql-statement to create the table with the problematic field.
No, the problem is not in any read-only property, because i can change field with integer number!
I use TZQuery with folowing sql statement for selecting records:
Code: Select all
SELECT * FROM RacunGL, Artikli WHERE (RacunGl.IdRacunGL = :ID) AND Artikli.IdArtikli IN (RacunGl.IdAtrikla)
SQL statement for table RacunGl:
Code: Select all
CREATE TABLE `racungl` (
`idRacunGl` int(10) unsigned NOT NULL default '0',
`idAtrikla` int(10) unsigned default NULL,
`Kolicina` float unsigned default NULL,
`Cijena` float default NULL,
`Ukupno` float NOT NULL default '0',
KEY `RacunGl_idRacuna` (`idRacunGl`)
) ENGINE=MyISAM DEFAULT CHARSET=latin2;
Code: Select all
TZQuery1Kolicina.AsFloat := StrToFloat(Edit1.Text);
I have found a way around. I use direct mysql client, and i have to change ',' to '.' in float numbers. In my regional setting decimal sign is ',' and MySql accepts only decimal sign '.'. This is working, but i don't like this solution!!
And i applyed both patches to ZeosDbo 6.1.5!
That's all from Amos Sam
good, better, linux!
Is someone selling a apartment on Pluton?
good, better, linux!
Is someone selling a apartment on Pluton?
-
- Fresh Boarder
- Posts: 3
- Joined: 31.10.2005, 17:28
OK, I'm not that sure, but I think in a query like yours
There's a component called ZUpdateSQL for updating fields in joined tables like your query represents.
By the way: is there any reason (maybe performance), why you don't use a join or "Artikli.IdArtikli=RacunGI.IdArtikla" in your query (I'm just curious)?
changing a field should not work anyway - not with floats and not with integers. If it works with integers, this should be the bug.SELECT * FROM RacunGL, Artikli WHERE (RacunGl.IdRacunGL = :ID) AND Artikli.IdArtikli IN (RacunGl.IdAtrikla)
There's a component called ZUpdateSQL for updating fields in joined tables like your query represents.
By the way: is there any reason (maybe performance), why you don't use a join or "Artikli.IdArtikli=RacunGI.IdArtikla" in your query (I'm just curious)?
My mistake. I use ZTable witch i filter by two id's from selected record from ZQuery.therealkev wrote:OK, I'm not that sure, but I think in a query like yours
changing a field should not work anyway - not with floats and not with integers. If it works with integers, this should be the bug.SELECT * FROM RacunGL, Artikli WHERE (RacunGl.IdRacunGL = :ID) AND Artikli.IdArtikli IN (RacunGl.IdAtrikla)
So the code is:
Code: Select all
DataModule1.ZTable1.Filtered := False;
DataModule1.ZTable1.Filter := 'idRacunGl = ' + ZQuery1idRacunGl.AsString + ' AND idAtrikla = ' + ZQuery1idArtikli.AsString;
DataModule1.ZTable1.Filtered := True;
DataModule1.ZTable1.Edit;
// DataModule1.ZTable1Kolicina get's its value from DBEdit control
DataModule1.ZTable1Ukupno.AsFloat := StrToFloat(DBEdit1.Text) * DataModule1.ZTable1Cijena.AsFloat;
DataModule1.ZTable1.Post;
Whell, no particular reason! I didn't try the way you suggested, because in the way i wrote, it works fine with about 30k records in 'RacunGl' and about 200 records in Artikli.By the way: is there any reason (maybe performance), why you don't use a join or "Artikli.IdArtikli=RacunGI.IdArtikla" in your query (I'm just curious)?
That's all from Amos Sam
good, better, linux!
Is someone selling a apartment on Pluton?
good, better, linux!
Is someone selling a apartment on Pluton?