Fetching MySQL data into tstringlist lazarus / 8-Other ---------------------------------------------------------------------- IndianaJones · 2009-10-23 09:48 Hi all, I have a mysql table and want to fetch/read data into tstringlist or array. How can i do that? Thanks. ---------------------------------------------------------------------- clauslack · 2009-10-23 12:52 Hello We do it this in our systems, works fine with remote systems, because return fields from a record in one transaction(faster). Code: [Select]GlistaCampos:=TStringList.create;   GlistaValores:=TStringList.create; try   Carga_Datos.SelectRecord('table',filter,'code','name');   Code:=ValorDeLista('code',GlistaCampos,GlistaValores);   Price:=ValorDeLista('price',GlistaCampos,GlistaValores);   Another Data from the record finally  GlistaCampos.free; GlistaValores.free; end; In Carga_Datos.SelectRecord -> (from Sql to StringList) Code: [Select]    for i:=0 to SQLQuery1.FieldCount-1 do begin         GlistaCampos.add(SQLQuery1.Fields[i].FieldName);         GlistaValores.add(SQLQuery1.Fields[i].AsString);     end; We use Carga_Datos.SelectRecord for any table. ValorDeLista return field name and field value from the StringList. Regards