Page 1 of 1

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

Posted: Wed 28 Mar 2007 13:19
by swierzbicki
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=

Posted: Thu 29 Mar 2007 08:44
by Antaeus
Please provide me with the script to create and fill tables used in the query. You can send it to evgeniyd*crlab*com.

Posted: Thu 29 Mar 2007 15:20
by swierzbicki
Done

Posted: Tue 03 Apr 2007 08:35
by swierzbicki
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: