baanuser12
23rd July 2013, 10:00
Hi
I wanted to create maintain session for a table but for large labels, generate session gave does not fit, generation aborted error so I am creating session manually.
Issue: when i try to insert next record and click save, session says record already exists however there is no record as such. I can guess that the last record buffer is still taken by program.
Any idea how to fix? Check attachment.
Thanks
bhushanchanda
23rd July 2013, 11:24
If this is a customized table, try to delete all the data (if its not useful) and then try again. If the problem still exists, you can put the session under debug mode and check what's happening in the script. Also, make sure if the index fields for the table are set properly, may be the records have similar index values.
A trick :- I have experienced this a few months before, and I was able to tackle it by converting the maintain session to update session. By it may not be advisable in your case.
Here are the similar threads:-
Thread1 (http://www.baanboard.com/baanboard/showthread.php?t=55395)
Thread2 (http://www.baanboard.com/baanboard/showthread.php?t=64192)
Thread3 (http://www.baanboard.com/baanboard/showthread.php?t=26942)
vamsi_gujjula
23rd July 2013, 11:50
hi baanuser12 ,
As bhushan said check the records if the tables (not required to delete )
if records does not exists the the possible cause for the error may due to buffer at you said.
let me help you with example
-
key 1 key 2
lower.limit upper.limit
record-1 10 20
record-2 30 40
record 1 and 2 are unique but my requirement is that it should have unique range and should not over lap (ie the 2nd record cannot be 15 -30 , as records 1st upperlimit is 20) in this case you might be fetching data from main table , during that process you fill the table fields(nothing but buffer) with fetched record (this might not be visible in the form ) and hence the error
check out on.main.table or use alias or bind variables of select fields while reffering to main table while checking
baanuser12
5th August 2013, 09:56
Thanks vamsi and bhushan for your valuable reply!
vamsi_gujjula
5th August 2013, 12:12
so what was the Issue..?
bhushanchanda
5th August 2013, 12:24
Yes,
It will help other's who face the same or related issues. Do post your solution please.
baanuser12
7th August 2013, 12:05
I'd added new index part 'start date' in 2nd index and was trying to maintain data with that however it is by default taking first index resulting into 'record already exist' error so I moved the new index part to first index. It worked.
vamsi_gujjula
8th August 2013, 08:47
index 1 is defiantly unique , where as index-2 can be a duplicate.....
bdittmar
8th August 2013, 09:36
I'd added new index part 'start date' in 2nd index and was trying to maintain data with that however it is by default taking first index resulting into 'record already exist' error so I moved the new index part to first index. It worked.
Hello,
before creating own tables, you always have to consider the database rules for normalization.
Always try to use 3rd normalform.
https://en.wikipedia.org/wiki/Database_normalization
Regards
vamsi_gujjula
8th August 2013, 18:41
infact this was the favorite Viva question..:P:D