---------------------------  
Debugger  Exception  Notification  
---------------------------  
Project  Project1.exe  raised  exception  class  EVariantTypeCastError  with  message  'Could  not  convert  variant  of  type  (Null)  into  type  (Double)'.  Process  stopped.  Use  Step  or  Run  to  continue.  
---------------------------  
OK      Help        
---------------------------  
大家到哪去查这些错误的信息到底什么意思啊?不会用金山词霸吧???

解决方案 »

  1.   

    'Could  not  convert  variant  of  type  (Null)  into  type  (Double)'
    数值转换出错,无法把空值赋给浮点数
      

  2.   

    数据类型转换错误了自己单步执行
    然后检查自己的赋值操作是否正确
    在可能出错的地方
    尽量用
    try
    //cover.....
    except
    end;
      

  3.   

    无法将空值转换为DOUBLE类型
    估计是你表中某个字段是空的
    可以判断一下
    if query1.FieldByName('FieldName').Value<>null then
    转换
      

  4.   

    最好是在语句中使用 isnull(字段,0) as 字段  
      

  5.   

    你操作的某一个表的一个字段是空值(NULL),但你没做判断就硬转换成浮点数(DOUBLE)型了,判断是不是空值用IS NULL判断