Problem with DBLookupComboBox

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
c001eR_2003
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 26.10.2005, 19:11

Problem with DBLookupComboBox

Post by c001eR_2003 »

Hi.

I'm using zeos (13/10 release) with Delphi 7.1.

For some reason, the DBLookupComboBox ListField doesn't display the data when I select something from the dropdown list or when I browse the table. It works (shows the data from the list source and selects the key when I click), but it displays nothing.

Does anyone know why is this happening and how to fix it?

P.S. I don't have this problems when I use bde or dbexpress components.
c001eR_2003
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 26.10.2005, 19:11

Post by c001eR_2003 »

I forgot to say that I'm using MySQL 4.1
User avatar
dhongu
Junior Boarder
Junior Boarder
Posts: 37
Joined: 28.09.2005, 08:37
Location: Bucuresti
Contact:

Post by dhongu »

Dorin Hongu
c001eR_2003
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 26.10.2005, 19:11

Post by c001eR_2003 »

I've did what they said there but the dblookup is still not working :(
I've added this line

Code: Select all

function TZAbstractRODataset.InternalLocate(KeyFields: string;
KeyValues: Variant; Options: TLocateOptions): LongInt;
//VISOR line 2263
OnlyDataFields:=false;
//VISOR
and also changed the procedure compareFieldsFromResultSet

Code: Select all

 case CurrentType of
stBoolean:
begin
Result := KeyValues[I].VBoolean =
ResultSet.GetBoolean(ColumnIndex);
end;
stByte,
stShort,
stInteger,
stLong:
begin
Result := KeyValues[I].VInteger =
ResultSet.GetLong(ColumnIndex);
end;
stFloat,
stDouble,
stBigDecimal:
begin
Result := Abs(KeyValues[I].VFloat -
ResultSet.GetBigDecimal(ColumnIndex)) <
FLOAT_COMPARE_PRECISION;
end;
stDate,
stTime,
stTimestamp:
begin
Result := KeyValues[I].VDateTime =
ResultSet.GetTimestamp(ColumnIndex);
end;
Do I need to do something more or what? I really do not understand why isn't working now...
username
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 12.10.2005, 15:00
Location: Bolivia

Post by username »

Hi,

I had the same problem. This my tabla

Code: Select all

CREATE TABLE `cargos` (
  `Id` SmallInt(6) NOT NULL auto_increment, 
  `Cargo` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`Id`),
  UNIQUE KEY `Cargo` (`Cargo`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Cargos de la Empresa';
change SmallInt(6) to Int(6)
joker53
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 13.09.2006, 13:28

Post by joker53 »

i have the same problem too, i made the modifications, i recompiled the package of ´Zeo but it is strange, if the value of the fiel for the lookupcombo is one it works ok, but if it is other value this does not work.....
Wath can be wrong?....
i´m with delphi 6 and mysql 4.1
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi Joker 53. Are you using the same verion as the first posters? If so please upgrade to one of the newer packages at http://users.telenet.be/mdaems or SVN repository (testing branch!!).
If you're already using this version... sorry about the remark. In that case I hope somebody knows how to fix it and posts a patch I can commit to SVN.

Mark
joker53
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 13.09.2006, 13:28

Post by joker53 »

thank you very much, i´m using one of 10/2005 i will upgrade now.
About the problem, i changed mi field from int(11) to int(9) and it works fine....
thank you very much
Post Reply