Someone to help me, I'm doing a query in MySQL with C #, but it does not show me any data, this is the query I'm doing:
public DataTable Espera(String Programa, String FI, String FF)
{
DataTable dt = new DataTable();
String query = @"SELECT IL.Cliente, CA.Programa, IL.Estilo,
IL.Color, SUM(IL.Total) AS Pares,
CA.Material, CA.Departamento,
CA.Fecha_Pago AS Fecha_Pedido
FROM galaxyfx_produccion.compras_ange AS CA INNER
JOIN galaxyfx_produccion.infolote AS IL
ON CA.Programa = IL.Programa
WHERE (CA.Programa LIKE '%"+ Programa + @"%')
AND (CA.Estado = 'En Espera')
AND (CA.Fecha_Pago BETWEEN '"+ FI
+"' AND '"+ FF + @"')
GROUP BY CA.Material, CA.Programa,
CA.Departamento, CA.Fecha_Pago";
dt = daccess.select(query);
return dt;
}
I have already modified it several times, but it does not work, besides that if I remove the date range, it works normally.