Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbLookupComboBox - 20 characters max!?

Status
Not open for further replies.

den

Technical User
May 19, 2000
9
GB
Hi
I'm new to Delphi - any help greatly appreciated!.
I'm using a dbLookup Combo box with Absolute db, reading a second table for list entries.
The problem is that when I select any list item over 20 characters - it doesn't show in the combo edit box at all - and though it posts, gets truncated to 20 chars in the db's field.
I added an Edit box on the form to the field in use - and it correctly displays all the characters, while the combo box remains empty if >20.
I've been all through the db fields and indices to ensure no 'max 20' exists. The dbLookupComboBox dosen't have a 'MaxLength' field - I've checked. can't find anything relevant in the Help File.
Any suggestions as to where the '20 charcter' bottle neck might be greatly appreciated.
Den
(I think I can work around this if no solution by using a second 'display name' field that is less than 20 characters)

 
Look at the "Fields Editor" for your "TQuery Object" for the lookup table. If any fields may have changed, go ahead and right-click, "Select All", "Delete", then "Add All Fields" to refresh the list. Now for each field, look at properties "Size" and "DisplayWidth" for the field in question.

Roo
Delphi Rules!
 
Thanks for this Roo.
In the end I got so frustrated with it earlier - I deleted the damn lot and started again fresh - amazingly it came good doing all the same Delphi things afresh (with a copy of the same db). Well, obviously something different...as it works - but now of course, I don't know what the exact problem was.
But I will file your response as useful info, and just in case the problem rears it's ugly head again!
Thanks for responding,

Den
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top