That suggests that there are trailing spaces in the database columns. Try modifying the query to remove these using the TRIM function:
FROM [TransactionGroup].[dbo].[AQVision_Cognex]
WHERE TRIM(PartNumber) LIKE :partNumber
WHERE TRIM(MachineID) LIKE :machineID
WHERE DateTime BETWEEN :startDate AND :endDate
While ``E373%` might work now it could bite someone later if there are variants. I wouldn't.