delphi7设计的程序出错
弹窗:Projectjxc.exeraisedexceptionclassEDatabseErrorwithmessage’ADOQuery1:Fiedl’单位’notf...
弹窗:Project jxc.exe raised exception class EDatabseError with message’ADOQuery1:Fiedl’单位’ not found’.Process stopped.Use Step or Run to continue.
关闭弹窗后,跟踪到这段代码:if (currentCol=3) and (stringgrid1.Cells[2,currentRow]<>'') then
begin
adoquery1.Close;
adoquery1.SQL.Add('select distinct 单位 from 商品清单 where 货号='''+stringgrid1.Cells[1,currentRow]+'''');
adoquery1.Open;
stringgrid1.Cells[3,currentRow]:=adoquery1.FieldByName('单位').AsString;
stringgrid1.Cells[8,currentRow]:='17'
end;
定位到这一行:stringgrid1.Cells[3,currentRow]:=adoquery1.FieldByName('单位').AsString;
stringgrid1.Cells[8,currentRow]:='17'
请问哪里出问题了,应怎样处理? 展开
关闭弹窗后,跟踪到这段代码:if (currentCol=3) and (stringgrid1.Cells[2,currentRow]<>'') then
begin
adoquery1.Close;
adoquery1.SQL.Add('select distinct 单位 from 商品清单 where 货号='''+stringgrid1.Cells[1,currentRow]+'''');
adoquery1.Open;
stringgrid1.Cells[3,currentRow]:=adoquery1.FieldByName('单位').AsString;
stringgrid1.Cells[8,currentRow]:='17'
end;
定位到这一行:stringgrid1.Cells[3,currentRow]:=adoquery1.FieldByName('单位').AsString;
stringgrid1.Cells[8,currentRow]:='17'
请问哪里出问题了,应怎样处理? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询