This topic is locked

Advaced Search Problem

9/4/2005 12:38:32 AM
ASPRunnerPro General questions
Alberto author

Hello
There is a problem with the advanced search option, please check the next sample and explanation:
DateField (Equal or More than...)xx/xx/xxxx

TextField (empty)
Any DATE comparison FOLLOWED with any TEXT field with EMPTY comparison brings all records that meet the second condition as EMPTY and doesn't consider the Date comparison. It acts like we don't have the first comparison.
In you need to reproduce the error you can use the link I have provided by email for previews situations.
Thank you very much for the help

Sergey Kornilov admin 9/5/2005

Alberto,
answered to your personal email.

Alberto author 9/7/2005

Sergey, No answer was received for this problem.
It looks like the advanced search does not conect the two conditions like this (in SQL)
Field1="xx/xx/xxxx" and Field2 Empty
It looks like it does not work with AND or just take the last condition wich is Field2 Empty.
I downloaded the software again, just in case, but doesnt work. I am trying to find out in my way but is hard for me to find it and have no luck yet.
Thanks for your help and support to solve the problems

Sergey Kornilov admin 9/7/2005

Alberto,
I asked you to send me SQL query that search page generates.

Alberto author 9/7/2005

Sergey:
How do I get that for you?. I think that is generated on the fly when I click on the button search and I am not sure how to get it for you.

Alberto author 9/7/2005

Never mind here it is Sergey:
select [NumeroContrato], [NumeroAgendamiento], [UsuarioCobranzas], [NombreDestinatario], [FechaVenta], [FechaEntrega], [CodigoAsesor], [NombreEnvio], [DireccionEnvio], [CiudadEnvio], [EstadoRegionEnvio], [CodigoPostalEnvio], [PaisEnvio], [TelefonoContacto], [InstruccionesEspeciales], [PrecioContado], [CostoEnvio], [Impuesto], [TotalContado], [PrePaidAmount], [PrePaidMetodo], [CODAmount], [CODMetodo], [DownPayment], [AFinanciar], [Interes], [BalanceTotal], [NumeroCuotas], [MontoCuota], [TotalAPagar], [FormaPago], [AreaVentas], [Status], [FechaSolicitudDespacho], [EntidadDestino], [EmailDestino], [UsuarioDespacho], [ShipVia], [Puntaje], [GrabacionCierre], [UsuarioVerificacion], [MailingAddressPOBOX], [MailingCity], [MailingState], [MailingZipCode], [Regalos], [Arrendador], [FonoArrendador], [TiempoEnDomicilio], [RelacionVivienda], [NombreConyuge], [SeguroSocialConyuge], [FonoConyuge], [ActividadConyuge], [TieneTarjetaCredito], [TieneCuentaCorriente], [LlamarHasta22Hrs], [MesContable] From [dbo].[tbContratos] where (1=1 and [FechaEntrega] >='2003-5-10' and [CodigoAsesor] is null or [CodigoAsesor]='')

Alberto author 9/11/2005

Thanks for the solution. It wors ok