cdsq_Any.Close;
  cdsq_Any.CommandText:='select sum(permonth_amount) as amount_bylmbudget from Budgetpermonth where bgt_year = '''+cdst_Budgetpermonth.fieldbyname('bgt_year').value+ ''' and bgt_month < '''+cdst_Budgetpermonth.fieldbyname('bgt_month').value+''' and fund_no = '''+cdst_Budgetpermonth.fieldbyname('fund_no').value+'''';
  cdsq_Any.Open;
  f_Fundconsume.lbl_amountbylmbudget.Caption := floattostr(cdsq_Any.fieldbyname('amount_bylmbudget').value);問題如下;
sum(permonth_amount)中的permonth_amount在數据庫中為decimal類型
程序運行時老是報錯為'invalid variant type conversion'.
還有一個問題,就是 decimal類型 轉換成 字符類型 用那個函數.