注册 登录
编程论坛 PowerBuilder

请教数据类型匹配的问题

zhong 发布于 2006-06-16 20:54, 737 次点击
我建立的一个函数有如下代码:
astr_target.xh= adw_source.getitemstring(al_row,'序号')
astr_target.sl= adw_source.getitemnumber(al_row,'药品数量')
astr_target.retailprice=adw_source.getitemnumber(al_row,'药品价格')
astr_target.je=adw_source.getitemnumber(al_row,'金额')
所用到的结构体为:
long xh
integer sl
decimal { 3 } retailprice
decimal { 3 } je
datawindow中的数据应该都是字符型的,现在我在执行上述函数时提示数据类型不匹配:

提示如下:
error: datawindow column type does not match getitem type at line 1 in function f_tq_ypnr of object f_tq_ypnr
请问如何解决这个问题?
谢谢各位指教~~~~~~~!!!!!!!!!!!!



1 回复
#2
mac1102006-06-21 11:57

这样试试看

astr_target.je=adw_source.getitedecimal(al_row,'金额')

1