我有一个数据库,想用零件号填充一个组合框,其中 TYPE = RKE 但是当我运行此代码时,它会出现错误
参数 xxx 没有默认值。
procedure TFMain.ComboTypeClick(Sender: TObject);
var
Qry:TADOQuery;
begin
Qry:=TADOQuery.Create(self);
try
Qry.Connection:=PronetConnection; //pronet is adoconnection
Qry.SQL.Clear;
Qry.SQL.Add('Select PartNumber FROM PNet WHERE Type = RKE');
Qry.Open;
with Qry do
begin
First;
ComboType.Items.Clear;
while not eof do
begin
ComboNumber.Items.Add(FieldByName('PartNumber').AsString);
Next;
end;
end;
finally
Qry.Active:=False;
Qry.Free;
end;
end;