when I run this code from the FMRQ.exe on the dmGest.MyQ_010030.open statement :Project FMRQ.exe raised exception class EDatabaseError with message MyQ_010030: Field 'TYPE' not found
Code: Select all
if RgStage.ItemIndex = 0 then
sStage := 'left join ' + Gestion + '.fmr1mac gmac on cma.perma = gmac.perma '
else if RgStage.ItemIndex = 1 then
sStage := 'left join cumul.fmr1mac cmac on cma.perma = cmac.perma ';
if RgCourriel.ItemIndex = 0 then
sCourriel := 'left join cumul.couriel ciel on cma.perma = ciel.PERMA ';
if RgPointeur.ItemIndex = 0 then
sPointeur := 'left join ' + Gestion + '.fmr1map gmap on cma.perma = gmap.perma ' ;
if RgRemarque.ItemIndex = 0 then
sRemarque := 'left join ' + Gestion + '.fmr1mar gmar on cma.perma = gmar.perma ' ;
if RgCotis.ItemIndex = 0 then
sCotisation := 'left join ' + Gestion + '.fmr1mab gmab on cma.perma = gmab.perma ' ;
if RgImprimerQui.ItemIndex = 0 then
sQui := 'where cma.perma = ''' + vPerma + ''''
else
sQui := 'where cma.perma in (Select perma from local.' + xUser + 'xselres) ';
dmGest.MyQ_010030.SQL.Clear;
dmGest.MyQ_010030.SQL.Text :=
'select * from cumul.fmr1ma cma ' +
sStage +
sPointeur +
sRemarque +
'left join ' + Gestion + '.fmr1ma gma on cma.perma = gma.perma ' +
sCotisation +
sQui;
dmGest.MyQ_010030.Open;
Code: Select all
// This is the code generated that run ok in MySql WorkBench
// This code also run in the MyQuery editor or when I click Active = True in the IDE
select * from cumul.fmr1ma cma
left join gest2012.fmr1mac gmac on cma.perma = gmac.perma
left join gest2012.fmr1map gmap on cma.perma = gmap.perma
left join gest2012.fmr1mar gmar on cma.perma = gmar.perma
left join gest2012.fmr1ma gma on cma.perma = gma.perma
left join gest2012.fmr1mab gmab on cma.perma = gmab.perma
where cma.perma = '1017391';
Is there a maximum number of fields ???
This query output around an hundred fields and 'TYPE' is around the 60.
Any idea welcome.
Yves