nuca he usado los puntos con este tipo de sentencias, haciendo pruebas y modificando código:
Código Delphi
[-]With Datamodule1.ADOQuery_consultasFlujo Do
Begin
Close;
SQL.Clear;
SQL.Add('SELECT * FROM Entradas_Salidas_ECS WHERE tipo_de_entrada =condicion1 and tipo_de_salida =condicion2 and nombre =condicion3 ');
SQL.Add('and Fecha_salida BETWEEN :condicion4 and :condicion5 ');
SQL.Add('and Fecha_de_entrada BETWEEN :condicion6 and :condicion7');
Parameters.Refresh;
Parameters.ParamByName('condicion1').Value:=RG_Entradas.Items.strings[RG_Entradas.ItemIndex];
Parameters.ParamByName('condicion2').Value:=RG_Salidas.Items.strings[RG_Entradas.ItemIndex];
Parameters.ParamByName('condicion3').Value:='Cliente';
Parameters.ParamByName('condicion4').Value:=StrToDatetime(E_Entrada_Inicio.Text);
Parameters.ParamByName('condicion5').Value:=StrToDate(E_Entrada_Fin.Text);
Parameters.ParamByName('condicion6').Value:=StrToDate(E_Salida_Inicio.Text);
Parameters.ParamByName('condicion7').Value:=StrToDate(E_Salida_Fin.Text);
Open;
End;
Ahora melanza el error "PArameter 'codición4' not found". Me estoy volviendo tarumba. ¿alguna otra idea?