DBCOMBO question to James

Post Reply
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

DBCOMBO question to James

Post by Richard Chidiak »

James

What would be the reason a dbcombo would show the "relative" position in the file for a numeric item instead of the real value ?

The combobox is redefined from resource and is not defined "sorted'

Thanks for help,

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Richard,

You can't use numeric data with either Combobox or DBComobo--the data must be converted to string. If numeric data values are passed as parameters to methods then they are assumed to be locations, not data elements.

DBCombo inherits from the Combobox class so it inherits the same behavior. Some time ago I tried to modify DBCombo to handle numeric data but it turned out to a huge amount of work since I would have to rewrite most of the combobox methods too.

Since DBCombo's can also use arrays, then you can just convert the database info to an array of strings before initializing DBCombo, then convert the selected value back to a number.

Regards,
James
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Post by Richard Chidiak »

James

Thanks for the reply, it is quite clear now

i will convert to string

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Post Reply