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類型 轉換成 字符類型 用那個函數.
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類型 轉換成 字符類型 用那個函數.
解决方案 »
- ListBox.Items.Add问题请教
- 关于Canvas.Draw(x, y, BMP);的问题
- 在线等,十万火急!一个关于WEBBROWSE的问题!
- 一个系统应该怎么写最好?
- 谁有关于程序优化,文件管理或文件分割的原代码呀!!!
- fastreport中barcode导出pdf的问题
- ADO中怎样分别改变对某个数据库、表单、表单中的某条记录的只读/可写状态啊?
- 请教各位高手ActionList控件跨窗体连接Button或Menu的问题给80分
- 大家好!谁用过Tgifimage?Come in,please!
- DELPHI调用MATLAB
- 在midas中怎样实现容错?????
- 测试一下新版,怎么看自己的分?
这样不是一了百了了吗?
f_Fundconsume.lbl_amountbylmbudget.Caption := formatfloat('0.00',cdsq_Any.fieldbyname('amount_bylmbudget').asfloat);