Page 1 of 1

Problem with DBLookupComboBox

Posted: 26.10.2005, 19:36
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.

Posted: 26.10.2005, 19:41
by c001eR_2003
I forgot to say that I'm using MySQL 4.1

Posted: 27.10.2005, 11:23
by dhongu

Posted: 27.10.2005, 18:25
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...

Posted: 02.01.2006, 22:30
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)

Posted: 14.09.2006, 20:45
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

Posted: 15.09.2006, 08:41
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

Posted: 15.09.2006, 12:17
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