Ver Mensaje Individual
  #1  
Antiguo 20-02-2012
Vales08 Vales08 is offline
Miembro
NULL
 
Registrado: feb 2011
Posts: 133
Reputación: 14
Vales08 Va por buen camino
Problemas con consulta sql y fecha

Buenas tardes, tengo un problema y necesito que me ayuden... Tengo el siguiente codigo y me gustaria que me digan si encuentran el error..

Código Delphi [-]
with (DM.Q_agen_tur )do
  begin
   SQL.Clear;
   SQL.Text:='select * from AGENDAS_TURNOS, PROFESIONALES '+
           'where AGENDAS_TURNOS.FECHA= ' + 'fecha'+
           'and PROFESIONALES.APELLIDO_Y_NOMBRE= ' + QuotedStr(prof_agen_turno.Text)+
           'and PROFESIONALES.ID_PROF = AGENDAS_TURNOS.ID_PROF ';
   ParamByName('fecha').AsDate:=fecha_turno.Date;
   Open;
  end;

El problema esta en el parametro 'fecha'...

Gracias de antemano...
Responder Con Cita