How do I Add a content from a table into a combobox? lazarus / 16-Databases ---------------------------------------------------------------------- workinghard · 2012-03-20 05:40 I really need to add some data into a comboboxes for my program from a mysql table called ratemaintenance procedure TForm3.CBClusterChange(Sender: TObject); begin      CbCluster.Clear;   SQLQuery1.SQL.Text := 'TableCluster' + ratemaintenance.Text;   SQLQuery1.Open;   while not SQLQuery1.EOF do begin     CbCluster.Items.Add(SQLQuery1.Fields[0].AsString);     SQLQuery1.Next;   end;   SQLQuery1.Close; These are the command line I was wondering what is wrong with it? It says that the error is identifier ratemaintenance is not found ---------------------------------------------------------------------- Lacak2 · 2012-03-20 06:19 What is meaning of: Code: [Select]SQLQuery1.SQL.Text := 'TableCluster' + ratemaintenance.Text; There should be some kind of select statement: Code: [Select]SQLQuery1.SQL.Text := 'select from  ratemaintenance'; ---------------------------------------------------------------------- workinghard · 2012-03-20 08:52 I've tried it, but it won't display any fields at all... And on the query component it runs, but only show all the records as (blob) Maybe is there sonething wrong on my table data tupe? I use text field type... ---------------------------------------------------------------------- BigChimp · 2012-03-20 09:23 There might be something wrong with the mapping between MySQL fields and Pascal types... Showing (blob) means that FPC has picked up the data but isn't showing them as it thinks it's a blob/binary field. Likewise, varchar fields are shown as (Memo). You might want to have a look through the bug tracker to see if any issues have been fixed with mysql text fields appearing as blobs. Also, this http://lazarus.freepascal.org/index.php/topic,16300.0.html post will show you some code to show the text of Memo fields instead of just (memo); you could adapt that if required to show the content of (blob) fields if you're sure they contain text... By the way, it helps if you post your Lazarus, FPC version and operating system... perhaps people will know by heart when some problems were fixed and can recomment upgrades etc. Good luck... ---------------------------------------------------------------------- workinghard · 2012-03-20 09:44 Thanks for the support BigChimp I'm running win7 x64 home premium, lazarus 0.9.30, with fpc 2.4.2 ---------------------------------------------------------------------- BigChimp · 2012-03-20 11:13 FPC 2.4.2 is old... You might want to upgrade to the recently released Lazarus 0.9.30rc4 (see main page for links), which should have FPC 2.6... ---------------------------------------------------------------------- workinghard · 2012-03-20 14:44 Too bad, i can't update My internet connection is quite unreliable right now ---------------------------------------------------------------------- User137 · 2012-03-20 16:35 You can try latest Internet browsers, for example Firefox or Google Chrome. They support download resuming, so even if internet disconnected, it can continue.