read from database lazarus / 16-Databases ---------------------------------------------------------------------- skaner1900 · 2011-12-03 23:11 The question like in the subject. First: I've got the database with text, integers and dates, and after sending the command SELECT I'd like to download the obtained result to the arrey of string variable or to a tabel component. Second: I'd like to download one selected line (SELECT FROM WHERE) to variables like string, integer and tddatetime May you include sample source? ---------------------------------------------------------------------- Arbee · 2011-12-05 07:41 I would suggest you start reading here: http://wiki.lazarus.freepascal.org/Databases and take it from there. ---------------------------------------------------------------------- skaner1900 · 2011-12-05 15:49 hmm i downloaded MySql5Test, but   ShowQueryForm := TShowQueryForm.Create(nil);   try     ShowQueryForm.DataSource1.DataSet := SQLQuery1; <----- This line reciving error: "File not open"     SQLQuery1.ParseSQL:=true;     SQLQuery1.ReadOnly:=false;     SQLQuery1.SQL.Text := CommandEdit.Text;     SQLQuery1.Open;     ShowQueryForm.ShowModal;   finally     SQLQuery1.Upda]"]>Blockedde:=upWhereChanged;     SQLQuery1.ApplyUpdates;     SQLTransaction1.Commit;     ShowQueryForm.Free;     SQLQuery1.Close;     SQLQuery1.ParseSQL:=false;     SQLQuery1.ReadOnly:=true;   end;  and how to show results? dbGrid1.DataSource:=SQLQuery1.DataSource; ?? it doesn't work... so... i don't know how to download information from database but i can how use it next ---------------------------------------------------------------------- paweld · 2011-12-05 16:43 http://wiki.lazarus.freepascal.org/Lazarus_Database_Tutorial#Simple_My SQL_Demo_Using_the_TMySQL50Connection_Component