Ver Mensaje Individual
  #1  
Antiguo 26-03-2012
maru_onofre maru_onofre is offline
Registrado
NULL
 
Registrado: feb 2012
Posts: 9
Reputación: 0
maru_onofre Va por buen camino
consultas mysql

Buenas Colegas. tengo una consulta en mysql me funciona muy bien en el editor de mysql me extra todo los datos relacionados, cuando la trato de ejecutar des de una Query en delphi 2010 con los diferentes parámetros me lanza la consulta con un SOLO (1) DATO.

la consulta en mysql es:::
Código SQL [-]
 Select* from soporte where  envia='maru' and fecha='24/04/2012' or recibe='maru' and fecha='24/04/2012'

en delphi :::::
Código SQL [-]
SELECT* FROM soporte WHERE  envia=:envia and fecha=:fecha or  recibe=:recibe and fecha=:fecha


este es el query

Código Delphi [-]
dm.ADOQuery_soporte.Close;
dm.ADOQuery_soporte.SQL.Clear;

dm.ADOQuery_soporte.SQL.Add('SELECT* FROM soporte WHERE  envia=:envia and fecha=:fecha');
dm.ADOQuery_soporte.SQL.Add('or  recibe=:recibe and fecha=:fecha');

dm.ADOQuery_soporte.Parameters.ParamByName('envia').Value:='maru';
dm.ADOQuery_soporte.Parameters.ParamByName('recibe').Value:='maru';
dm.ADOQuery_soporte.Parameters.ParamByName('fecha').Value:='24/04/2012';
dm.ADOQuery_soporte.Open;

Última edición por Casimiro Notevi fecha: 26-03-2012 a las 11:26:50.
Responder Con Cita