PowerBuild Application Execution Error R0006
错误消息: Application terminated
Error:Invalid DataWindow row/column specified as line 32 in function of_update of object
w_update
函数
function of_update:
string ls_cph,ls_xmh,ls_gs
double je,je1,je2
integer li_count,li_col,i=1
string error_syntaxfromSQL, error_create
string new_sql, new_syntax
datastore dw_13
dw_13 = create datastore
new_sql = "select sjzd.xmh,sjzd.jsgs from cost,sjzd where dh = '"+ls_cph+"'"+" and sjzd.xmh = cost.xmh and sjzd.jsgs <> '' order by sjzd.xmh"
new_syntax = SQLCA.SyntaxFromSQL(new_sql, 'Style(Type= grid)', error_syntaxfromSQL)
IF Len(error_syntaxfromSQL) > 0 THEN
messagebox("错误", error_syntaxfromSQL)
ELSE
dw_13.Create(new_syntax, error_create)
IF Len(error_create) > 0 THEN
messagebox("错误", error_create)
END IF
END IF
dw_13.SetTransObject(SQLCA)
li_count = dw_13.Retrieve()
ls_cph = dh1
do while i<=li_count
ls_xmh = dw_13.getitemstring(i,'xmh') //在本地调试到这里就会弹出上班的错误
ls_gs = dw_13.getitemstring(i,'jsgs')
je = of_getgs(ls_gs,ls_cph)
update cost set je = :je where dh = :ls_cph and xmh = :ls_xmh using sqlca;
commit using sqlca;
i++
loop
我调试的时候连服务器上的数据调试就不会出现这个问题,但把数据库拷到本地上测试却有这个错误。大家帮帮忙。
of_update(ls_dh)传入一个单号