views:

42

answers:

1

Hi

I have list of country names or other strings in a text blob field. When I read the field, I get a string back with LfCr between the words or phrases. Is there an easy way to assign this string to the Items property of a TComboBox? I'm using TADOQuery on a FireBird 2.1 Database.

Regards, Pieter

+2  A: 

If you've got LFCRs between the phrases, then just assign the string to the Items.Text property, which takes a string and splits it into individual items at the linebreaks.

Mason Wheeler
Thank you! That works perfectly. (I could not accept the answer as I have to wait at lease 8 minutes it seems!!)
Pieter van Wyk
Another option is to read the blob as a TStream using the TDataSet.CreateBlobStream() method, and then call the Items.LoadFromStream() method.
Remy Lebeau - TeamB