Premahari
26th April 2018, 08:07
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

giggty
26th April 2018, 10:37
So what is the actual error message?

Premahari
27th April 2018, 07:21
On success it should return 0. But it's returning -12, that means its not inserting that serial number. This is the error

Ajesh
27th April 2018, 08:44
Whats the value in the parameter "err.msg" ??

Premahari
30th April 2018, 08:48
Hi,
I got an error of invalid value for serial number field.
Now I fixed that error. Its working fine Thank u very much