ODBC配置正常,但是SQL语句很长,以下是我的赋值语句,不知道有问题吗?
QueryRybz->SQL->Add("select sum(czxqk.jhyjs11+czxqk.jhbk11+czxqk.jhdz11+czxqk.jhzz11+czxqk.jhyjs12+czxqk.jhbk12+czxqk.jhdz12+czxqk.jhzz12+czxqk.jhyjs13+czxqk.jhbk13+czxqk.jhdz13+czxqk.jhzz13+czxqk.jhyjs14+czxqk.jhbk14+czxqk.jhdz14+czxqk.jhzz14+czxqk.jhyjs15+czxqk.jhbk15+czxqk.jhdz15+czxqk.jhzz15) as s1");
QueryRybz->SQL->Add(", sum(sgdz11+sgzz11+sgdz12+sgzz12+sgdz13+sgzz13+sgdz14+sgzz14+sgdz15+sgzz15) as s2");
QueryRybz->SQL->Add(", sum(jhyjs21+jhbk21+jhdz21+jhzz21+jhyjs22+jhbk22+jhdz22+jhzz22+jhyjs23+jhbk23+jhdz23+jhzz23+jhyjs24+jhbk24+jhdz24+jhzz24+jhyjs25+jhbk25+jhdz25+jhzz25) as s3");
QueryRybz->SQL->Add(", sum(dxyjs21+dxbk21+dxdz21+dxzz21+dxyjs22+dxbk22+dxdz22+dxzz22+dxyjs23+dxbk23+dxdz23+dxzz23+dxyjs24+dxbk24+dxdz24+dxzz24+dxyjs25+dxbk25+dxdz25+dxzz25) as s4");
QueryRybz->SQL->Add(", Sum(czxqk.zzgbjx) as s5, Sum(czxqk.ytjg) as s6, Sum(czxqk.yrcm) as s7, Sum(czxqk.yrgs) as s8, Sum(czxqk.dfdxs) as s9, Sum(czxqk.cjsg) as sa, Sum(czxqk.wx) as sb");
QueryRybz->SQL->Add(", (select sum(cglgbzhb.xyrs) from cglgbzhb where cglgbzhb.kyear = :kyear and cglgbzhb.gbfl = '1') as sc");
QueryRybz->SQL->Add(", (select sum(cglgbzhb.xyrs) from cglgbzhb where cglgbzhb.kyear = :kyear and cglgbzhb.gbfl = '2') as sd");
QueryRybz->SQL->Add(", (select sum(cglgbzhb.xyrs) from cglgbzhb where cglgbzhb.kyear = :kyear and cglgbzhb.gbfl = '3') as se");
QueryRybz->SQL->Add(", (select sum(cglgbzhb.xyrs) from cglgbzhb where cglgbzhb.kyear = :kyear and cglgbzhb.gbfl = '4') as sf");
QueryRybz->SQL->Add(", (select sum(cjyzhb.xyrs) from cjyzhb where cjyzhb.kyear = :kyear ) as sg");
QueryRybz->SQL->Add(", (select sum(cjfzhb.xyrs) from cjfzhb where cjfzhb.kyear = :kyear ) as sh");
QueryRybz->SQL->Add(", (select sum(cyxjgbz.sbrs) from cyxjgbz) as si");
QueryRybz->SQL->Add("from czxqk where czxqk.kyear =:kyear");
(最后错误提示为 "capcity not supported" )