用qrexpr计算SQL Server2000中几个类型为money的字段的和,则qrexpr.Value的类型是什么?怎么把它转为real型?

解决方案 »

  1.   

    如下类型:
    type TQREvResultType = (resInt, resDouble, resString, resBool, resError)
    type TQREvResult = record
           case Kind : TQREvResultType of
             resInt    : (intResult : Longint);
             resDouble : (dblResult : Double);
             resString : (strResult : String[255]);
             resBool   : (booResult : Boolean);
         end对于你这种情况,qrexpr.Value.resString得到字符串、qrexpr.Value.resDouble得到浮点数————————————————————————————————————
    宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
    ————————————————————————————————————
      

  2.   

    上面写错了:对于你这种情况,qrexpr.Value.strResult得到字符串、qrexpr.Value.dblResult得到浮点数————————————————————————————————————
    宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
    ————————————————————————————————————