Santosh_mali
10th October 2017, 18:29
Hi,
I am getting a fatal error as Error 100(Duplicate value) on one customised table tcsec054. Table has one primary index and 10 more duplicate indices.
this error is coming while in case of db.update not db.insert.
i checked in debug mode, retry is happening 10 times and at the end fatal error coming.
i checked multiple things but not helping.
this is the source code,
db.retry.point()
select tcsec054.*
from tcsec054 for update
where tcsec054._index1 = {:location}
selectdo
tcsec054.nama = tccom013.nama
tcsec054.namb = tccom013.namb
tcsec054.namc = tccom013.namc
tcsec054.namd = tccom013.namd
tcsec054.city = city
tcsec054.stat = state
tcsec054.pstc = tccom013.pstc
tcsec054.ccty = tccom013.ccty
tcsec054.cnst = cnst
tcsec054.lcst = loc.status
tcsec054.cplt = price.list
tcsec054.crep = sales.rep
tcsec054.creg = area
tcsec054.cfcg = cfcg
tcsec054.cste = cste
tcsec054.bloc = frm.bloc
db.update(ttcsec054, db.retry, e)
if not e then
commit.transaction() |* Fatal Error coming at this line
endif
selectempty
tcsec054.cloc = location
tcsec054.cuno = tccom013.cuno
tcsec054.cdel = tccom013.cdel
tcsec054.nama = tccom013.nama
tcsec054.namb = tccom013.namb
tcsec054.namc = tccom013.namc
tcsec054.namd = tccom013.namd
tcsec054.city = city
tcsec054.stat = state
tcsec054.pstc = tccom013.pstc
tcsec054.ccty = tccom013.ccty
tcsec054.cnst = cnst
tcsec054.lcst = loc.status
tcsec054.cplt = price.list
tcsec054.crep = sales.rep
tcsec054.creg = area
tcsec054.cfcg = cfcg
tcsec054.cste = cste
tcsec054.bloc = frm.bloc
db.insert(ttcsec054, db.skip.dupl, e)
if not e then
commit.transaction()
endif
endselect
Thanks in advance.
I am getting a fatal error as Error 100(Duplicate value) on one customised table tcsec054. Table has one primary index and 10 more duplicate indices.
this error is coming while in case of db.update not db.insert.
i checked in debug mode, retry is happening 10 times and at the end fatal error coming.
i checked multiple things but not helping.
this is the source code,
db.retry.point()
select tcsec054.*
from tcsec054 for update
where tcsec054._index1 = {:location}
selectdo
tcsec054.nama = tccom013.nama
tcsec054.namb = tccom013.namb
tcsec054.namc = tccom013.namc
tcsec054.namd = tccom013.namd
tcsec054.city = city
tcsec054.stat = state
tcsec054.pstc = tccom013.pstc
tcsec054.ccty = tccom013.ccty
tcsec054.cnst = cnst
tcsec054.lcst = loc.status
tcsec054.cplt = price.list
tcsec054.crep = sales.rep
tcsec054.creg = area
tcsec054.cfcg = cfcg
tcsec054.cste = cste
tcsec054.bloc = frm.bloc
db.update(ttcsec054, db.retry, e)
if not e then
commit.transaction() |* Fatal Error coming at this line
endif
selectempty
tcsec054.cloc = location
tcsec054.cuno = tccom013.cuno
tcsec054.cdel = tccom013.cdel
tcsec054.nama = tccom013.nama
tcsec054.namb = tccom013.namb
tcsec054.namc = tccom013.namc
tcsec054.namd = tccom013.namd
tcsec054.city = city
tcsec054.stat = state
tcsec054.pstc = tccom013.pstc
tcsec054.ccty = tccom013.ccty
tcsec054.cnst = cnst
tcsec054.lcst = loc.status
tcsec054.cplt = price.list
tcsec054.crep = sales.rep
tcsec054.creg = area
tcsec054.cfcg = cfcg
tcsec054.cste = cste
tcsec054.bloc = frm.bloc
db.insert(ttcsec054, db.skip.dupl, e)
if not e then
commit.transaction()
endif
endselect
Thanks in advance.