I forgot completely Delphi. Stopped at "list index out of bounds". I do something like this:

begin ADOQuery1.Close; ADOQuery1.SQL.Clear; ADOQuery1.SQL.Add('SELECT text_answer FROM `answer` WHERE `question_id` = 1'); ADOQuery1.Open; DataSource1.DataSet:=ADOQuery1; RadioButton1.Caption:=AdoQuery1.Fields[0].asString; RadioButton2.Caption:=AdoQuery1.Fields[1].asString; RadioButton3.Caption:=AdoQuery1.Fields[2].asString; end; 

First AdoQuery1.Fields[0].asString; and everything works.
The query gets three lines.
A SQL query always stores data as an array.
Why it can be addressed only to the first index.
How to refer to the following records of the executed query?

    1 answer 1

    The Fields property allows you to access the cells of the current record.

    In your example, Fields[0] works correctly (returns the first cell of the current record from the set, that is, the contents of the current record text_answer ). Fields[1] returns an error because no second column.

    Moving through the records must be done through the methods First , Next

    In your case, it will look something like this:

     i:=1; ADOQuery1.Open; while not ADOQuery1.Eof do begin // Π²ΠΏΠΎΠ»Π½Π΅ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ, Ρ€Π°Π΄ΠΈΠΎΠ±Π°Ρ‚Ρ‚ΠΎΠ½Ρ‹ Π»Π΅ΠΆΠ°Ρ‚ Π½Π° ΠΊΠ°ΠΊΠΎΠΌ-Π½ΠΈΠ±ΡƒΠ΄ΡŒ ΠΊΠΎΠ½Ρ‚Ρ€ΠΎΠ»Π΅, Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€ - ΠΏΠ°Π½Π΅Π»ΠΈ. // Ρ‚ΠΎΠ³Π΄Π° Π½ΡƒΠΆΠ½ΠΎ ΠΏΡ€ΠΎΠ²ΠΎΠ΄ΠΈΡ‚ΡŒ поиск ΠΏΠΎ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚Π°ΠΌ этой ΠΏΠ°Π½Π΅Π»ΠΈ. // Π² этом ΠΏΡ€ΠΈΠΌΠ΅Ρ€Π΅ поиск ΠΈΠ΄Π΅Ρ‚ ΠΏΠΎ Ρ„ΠΎΡ€ΠΌΠ΅. RadioButton:=FindComponent('RadioButton'+IntToStr(i)) as TRadioButton; RadioButton.Caption:=ADOQuery1.Fields[0].AsString; Inc(i); ADOQuery1.Next; end; 
    • Here I swear! It was about this that I thought to move around the array with ordinary Next, but somehow I was afraid of banal primitiveness. Thank you very much! - I_CaR