Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 10th October 2017, 17:29
Santosh_mali Santosh_mali is offline
Junior Member
 
Join Date: Jun 2016
Posts: 6
Santosh_mali is on a distinguished road
Baan: Baan 4 - DB: oracle - OS: unix
Fatal Error - Error 100(Duplicate Value)
Baan: Baan IVc4
C/S: None/Unknown

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.
Attached Images
File Type: jpg Table Index.JPG (59.9 KB, 5 views)
Reply With Quote
  #2  
Old 10th October 2017, 17:39
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
What is the primary index? It almost looks like you are looking for location, which could return multiple records. From the code it looks like tcsec054.cloc, tcsec054.cuno,
tcsec054.cdel are part of the index.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #3  
Old 10th October 2017, 17:46
Santosh_mali Santosh_mali is offline
Junior Member
 
Join Date: Jun 2016
Posts: 6
Santosh_mali is on a distinguished road
Baan: Baan 4 - DB: oracle - OS: unix
Thanks Mark for quick reply.
Primary Index is only one field tcsec054.cloc.

Location variable is mapped with index.
Location is populated as,
location(1;6) = tccom013.cuno
location(7;1) = "-"
location(8;3) = tccom013.cdel
Reply With Quote
Sponsored Links
  #4  
Old 10th October 2017, 20:35
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Interesting - if the primary index is only location then I am not sure why it would come up with duplicate transaction. Are you sure all the other indexes allow duplicates? Is there anything in any of the logs that shows the error.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #5  
Old 11th October 2017, 12:45
Santosh_mali Santosh_mali is offline
Junior Member
 
Join Date: Jun 2016
Posts: 6
Santosh_mali is on a distinguished road
Baan: Baan 4 - DB: oracle - OS: unix
I think may be this is because of data issue. It is not happening for all records.
I checked the error logs, it only says about error. Any details are not given.
I am thinking about alternative solution that delete the record and insert it again.
Reply With Quote
  #6  
Old 13th October 2017, 10:54
JaapJD's Avatar
JaapJD JaapJD is offline
Guru
 
Join Date: Sep 2002
Location: Netherlands
Posts: 728
JaapJD will become famous soon enoughJaapJD will become famous soon enough
Baan: BaanIV, BaanERP, ERP LN 6.1 - DB: Oracle, SQL Server - OS: Unix, Windows
You can try if it helps to reorganize the table.
Reply With Quote
  #7  
Old 13th October 2017, 13:38
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Quote:
Originally Posted by Santosh_mali View Post
I think may be this is because of data issue. It is not happening for all records.
I checked the error logs, it only says about error. Any details are not given.
I am thinking about alternative solution that delete the record and insert it again.
Not sure that will work - you are doing an update and something is creating that duplicate error. To me it has to be one of the other indexes not allowing duplicates. Deleting the record you find and basically re-inserting the record again (new information) will still create a duplicate record error. Unless like JaapJD suggests the table or indexes might be corrupt in some way. We had this happen once or twice - but the errors we got were basically cannot find the record using indexes. Been a really long time since we have seen something like that.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #8  
Old 14th October 2017, 08:48
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,286
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
If its a DEV/TEST Environment, you can take a backup of your data, delete and recreate the table. Restore the data and see if it works for you.

Second step would be to reorganize the indices as Jaap mentioned. Index change can cause several data issue which are not easy to identify just by looking at the data.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fatal error hossjer Tools Administration & Installation 4 11th March 2013 08:39
Fatal Error : Maximum number of users reached Thassanee ไทยฟอรัม 3 28th May 2012 14:24
Fatal Error when creating BOM which contains ITtem Planning Data Judgement Manufacturing & Supply Chain 4 6th December 2010 11:52
Fatal Error exagon Tools Administration & Installation 2 1st November 2008 17:50
Fatal error after installing porting set 7.1d.11 JennyJ Tools Administration & Installation 4 17th March 2006 23:55


All times are GMT +2. The time now is 04:20.


©2001-2017 - Baanboard.com - Baanforums.com