capability not supported问题的处理

今天我的同事发邮件过来说我写的代理分销系统中,分销商商品商品销售范围指定单中,删除单品提示出错,提示是:"capability not supported"。我原来是认为是表结构建立的不正确的! 

create table "informix".rangeitem
  (
    sheetid char(16) not null ,
    vgno integer not null ,
    price decimal(12,2) not null ,
    mlv decimal(5,2)
        default 0 not null ,
    supplyid char(6),
    primary key (sheetid,vgno,supplyid)
  )  extent size 16 next size 16 lock mode page;

 

但是看了之后,没有一点问题啊,和以前的对表的控制一样的啊,怎么会出错呢?结合我的程序,问题是:我在保存之前,加上了下面的话。

 

procedure TForm880011.btnApplyClick(Sender: TObject);
begin
  query1.First;
  while not query1.Eof do
  begin
     query1.edit;
     if  query1price.Value =0 then Query1mlv.Value :=0
     else Query1mlv.Value := round((query1price.Value-query1cost.Value)/query1price.Value*100);
     query1.Next;
  end;
  inherited; 

end;

 

正式由于这个循环语句,导致了,删除时出错!我修改了程序,把对毛利率的计算,放在

procedure TForm880011.Query1priceChange(Sender: TField);
begin
  inherited;
  if  query1price.Value =0 then Query1mlv.Value :=0
  else Query1mlv.Value := round((query1price.Value-query1cost.Value)/query1price.Value*100); 
end;

 

这样问题,就迎刃而解了! 

总结,出现这样的问题,肯定是程序控制除了问题,请仔细检查自己的程序,是否有瑕疵!

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值