Sergey, I can't zip and send you my files but the problem is very clear, every time we do a search it does the same:
ERROR MESSAGE: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'NumeroContrato'.
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], [UsuarioVerificacion] From [dbo].[tbContratos] where [NumeroAgendamiento] =5215 NumeroContrato
It adds the name of the field that is part of the condition. When I use ADVANCED SEARCH with multiple fields it looks like it adds only the first field in the conditions to the SQL Statement as follows.
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], [UsuarioVerificacion] From [dbo].[tbContratos] where 1=1and upper([NumeroContrato] )=upper('MOR0005215') and [NumeroAgendamiento] =5215 NumeroContrato
Please try to help us ASAP since I already put this version in production thinking that was ok.
Thaks for your effort.