H
hcx
Unregistered / Unconfirmed
GUEST, unregistred user!
AQgclass.Close;
AQgclass.SQL.Clear;
aqgclass.SQL.Add('select distinct g.gclassid,gc.descr from goods as g,gdsclass as gc where g.gclassid=gc.gclassid and g.gclassid2=:gc2 and g.gclassid1=:gc11');
//aqgclass.Parameters.ParamByName('gc11').value:=aqgclass1.fieldbyname('gclassid1').asstring;
//aqgclass.Parameters.ParamByName('gc2').value:=aqgclass2.fieldbyname('gclassid2').asstring;
//a aqgclass.ParamByName('gc11').value:=aqgclass1.fieldbyname('gclassid1').asstring;
//a aqgclass.ParamByName('gc2').value:=aqgclass2.fieldbyname('gclassid2').asstring;
aqgclass.Open;
为什么当Aqgclass 为Adoquery时 用的是//后的语句编译时出现如下错(但执行文件又可以用)
"The application is using arguments that are of the wrong type are out of acceptable
range,or are in conflict with one anthor."
而当Aqgclass 为Tquery 时用//a 就什么都没。
那提示是在单步执行:
aqgclass.SQL.Add('select distinct g.gclassid,gc.descr from goods as g,gdsclass as gc where g.gclassid=gc.gclassid and g.gclassid2=:gc2 and g.gclassid1=:gc11');
后就出现。
AQgclass.SQL.Clear;
aqgclass.SQL.Add('select distinct g.gclassid,gc.descr from goods as g,gdsclass as gc where g.gclassid=gc.gclassid and g.gclassid2=:gc2 and g.gclassid1=:gc11');
//aqgclass.Parameters.ParamByName('gc11').value:=aqgclass1.fieldbyname('gclassid1').asstring;
//aqgclass.Parameters.ParamByName('gc2').value:=aqgclass2.fieldbyname('gclassid2').asstring;
//a aqgclass.ParamByName('gc11').value:=aqgclass1.fieldbyname('gclassid1').asstring;
//a aqgclass.ParamByName('gc2').value:=aqgclass2.fieldbyname('gclassid2').asstring;
aqgclass.Open;
为什么当Aqgclass 为Adoquery时 用的是//后的语句编译时出现如下错(但执行文件又可以用)
"The application is using arguments that are of the wrong type are out of acceptable
range,or are in conflict with one anthor."
而当Aqgclass 为Tquery 时用//a 就什么都没。
那提示是在单步执行:
aqgclass.SQL.Add('select distinct g.gclassid,gc.descr from goods as g,gdsclass as gc where g.gclassid=gc.gclassid and g.gclassid2=:gc2 and g.gclassid1=:gc11');
后就出现。