我在Delphi 6中用ADO控件獲取通過ODBC连接Informix资料库的数据时,发生上述的错误。我的sql是这样写的
with InfAdoTransQuery1 do
begin
close;
sql.Clear;
sql.Add('select ogd18e,sum(ogd09*ogd10/ogd19) qty from ogd_file where ogd01='''+DanNo+''' group by ogd18e');
open;
end;
QtyPerPallet := InfAdoTransQuery1.fieldbyname('qty').Value;
错误发生在InfAdoTransQuery1.fieldbyname('qty').Value取得值的时候,还没能来得及赋值给QtyPerPallet。 谢谢。
with InfAdoTransQuery1 do
begin
close;
sql.Clear;
sql.Add('select ogd18e,sum(ogd09*ogd10/ogd19) qty from ogd_file where ogd01='''+DanNo+''' group by ogd18e');
open;
end;
QtyPerPallet := InfAdoTransQuery1.fieldbyname('qty').Value;
错误发生在InfAdoTransQuery1.fieldbyname('qty').Value取得值的时候,还没能来得及赋值给QtyPerPallet。 谢谢。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货