Ver Mensaje Individual
  #2  
Antiguo 28-09-2010
Avatar de olbeup
olbeup olbeup is offline
Miembro
 
Registrado: jul 2005
Ubicación: Santiago de la Ribera (España)
Posts: 685
Reputación: 19
olbeup Va camino a la fama
Cita:
Query1.close;
SQLQuery1.SQL.Clear;
SQLQuery1.SQL.Text:='SELECT * FROM medico WHERE '+Combobox1.Text+' LIKE ''%'+Edit5.Text+'%''';
SQLQuery1.ExecSQL(true);
SQLQuery1.Open;
En éste código te sobra el SQLQuery1.ExecSQL(true), solo deja el SQLQuery1.Open, como así:
Código Delphi [-]
with SQLQuery1 do
begin
  if Active then Close;
  SQL.Clear;
  SQL.Add('SELECT *');
  SQL.Add('  FROM Medico');
  SQL.Add('  WHERE ' + ComboBox1.Text + ' LIKE ' + QuotedStr('%' + Edit5.Text + '%'));
  Open;
end;
Un saludo.
Responder Con Cita