con un componente query
yo uso mysql y mydac y quiero el texto en un tmemo.
suponiendo tu tabla tenga 5 campos
---------------------
| 0 | 1 | 2 | 3 | 4 |
---------------------
y tu quieres usar el texto de la posicion 0
---------------------
Código Delphi
[-]
procedure GetResults( SQLQuery: String; ZQuery: TMyQuery );
procedure TFprincipal.GetResults( SQLQuery: String; ZQuery: TMyQuery );
begin
MyQuery1.SQL.Text := SQLQuery;
MyQuery1.Open;
MyQuery1.DisableControls;
MyQuery1.First;
end;
GetResults('select ID from tabla_canales where nombre = "'+ Keyword +'"', MyQuery1);
id:= MyQuery1.Fields[0].AsString;
try
for i :=1 to MyQuery1.RecordCount do
begin
GetResults('Select * from tabla_titulares where owner = "'+ id + '"', MyQuery1 );
MemoDescription.Text := (MyQuery1.Fields[1].AsString);
MemoExample.Text := (MyQuery1.Fields[1].AsString);
result := true;
MyQuery1.Next;
end;
finally
end;