Hi iam trying to update serial from whinh226 to timfc010 through DAL. It's returning -12. On success It should return 0. can anyone please help. I have shared my code
select whinh226.cser:cser
from whinh226
where whinh226._index1 = {50,:orno,1,10,1,1,0}
selectdo
db.retry.point()
dal.new.object("timfc010")
dal.set.field("timfc010.koor",timfc.ord.sfc)
dal.set.field("timfc010.pdno",orno)
dal.set.field("timfc010.prsp",0)
dal.set.field("timfc010.mitm",mitm)
dal.set.field("timfc010.mser",cser)
ret = dal.save.object("timfc010")
if ret = 0 then
commit.transaction() | commit transaction
else
dal.get.error.message(err.msg) | get the last error message
abort.transaction() | abort transaction
message(err.msg) | display error message
endif
endselect
select whinh226.cser:cser
from whinh226
where whinh226._index1 = {50,:orno,1,10,1,1,0}
selectdo
db.retry.point()
dal.new.object("timfc010")
dal.set.field("timfc010.koor",timfc.ord.sfc)
dal.set.field("timfc010.pdno",orno)
dal.set.field("timfc010.prsp",0)
dal.set.field("timfc010.mitm",mitm)
dal.set.field("timfc010.mser",cser)
ret = dal.save.object("timfc010")
if ret = 0 then
commit.transaction() | commit transaction
else
dal.get.error.message(err.msg) | get the last error message
abort.transaction() | abort transaction
message(err.msg) | display error message
endif
endselect