4.40.0.23 / 4.40.0.24 : - Runtime Exception : #42S22 Field not found

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

4.40.0.23 / 4.40.0.24 : - Runtime Exception : #42S22 Field not found

Post by swierzbicki » Wed 28 Mar 2007 13:19

Hi,

I've a TmyQuery component (qrPoseContratParOS) using this sql statement :

Code: Select all

select posecontratparos.*,
(SELECT 
  SUM((MontantFacturePaiementDirectHT + MontantFactureFermobaHT))
FROM
  posefactureparcontratos
WHERE
posefactureparcontratos.IdContratPose = posecontratparos.IdContratPose
GROUP BY
  posefactureparcontratos.IdContratPose
)  AS TotalPaiementDirectHT

from 
posecontratparos
where IdOrdreService = :IdOrdreService
In design time, I can retreive all persistent fields.
At run time, when opening the query, i'm getting this exception :

'qrPoseContratParOS: field 'TotalPaiementDirectHT' not found

If I remove the 'TotalPaiementDirectHT' persistent field this error is no more raised. It looks like a regression since it was corrected in some version ago.

If you found the issue, can you provide me a fix for this ? (I own the source code). Thank you in advance.

PS : I had a 'similar' error in the past see my topic http://crlab.com/forums/viewtopic.php?t=7436&highlight=

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 29 Mar 2007 08:44

Please provide me with the script to create and fill tables used in the query. You can send it to evgeniyd*crlab*com.

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Thu 29 Mar 2007 15:20

Done

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Tue 03 Apr 2007 08:35

It is my fault. I've modified the SQL Statement in Design Time.
In run time, I'm loading the SQL Statement for each TMyQuery.

I've forgotten to modify one of my SQL Statement... That's way the field was missing.

Sorry for having bothering you with this :oops:

Post Reply