Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
17%
200 - 500 GB
17%
500 - 800 GB
6%
800 - 1200 GB
6%
1200 - 1500 GB
17%
1500 - 2000 GB
17%
> 2000 GB
22%
Total votes: 18

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 22nd July 2004, 06:23
veyant veyant is offline
Senior Member
 
Join Date: May 2003
Location: Gurgaon
Posts: 107
veyant is on a distinguished road
Baan: Baan IV/V - DB: Oracle - OS: Unix/AIX
Question Error - record not locked

Hi ,

I am facing a very strange problem. pls advice.

I created a main session having a subsession for recording lines and data is saved in two different tables (Header & Lines Table) with Order # as link field.

it is a type main table session. Now if i delete record from header form and lines are presnt for that order it gives error.

so lines are required to be deleted first. So i click on lines button and lines subsession opens and if i delete records from there. It is fine. Now when i come back to the main session and try to delete the Header it gives "Error 206 - Record is not locked" and record is deleted and session terminates automatically. Now if i rerun the same session and select the same order and press delete button. it deletes the record with any error.

Please advice why it is giving error in first go when i deleted the lines and then i try to delete header.

However, i have not written any code for deleting in both sessions (header & lines). as it is session with Main table so it is executing execute(mark.delete) itself.

thanks
Sandy
__________________
veyant
Reply With Quote
  #2  
Old 22nd July 2004, 14:27
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,122
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
It sounds like a transaction was started and not cleared. You might need to either write code to trap the error before the transaction or code to clear the current transaction. I usually trap the error and do a choice.again().

Mark
Reply With Quote
  #3  
Old 25th July 2004, 14:56
toolswizard toolswizard is offline
Senior Member
 
Join Date: Aug 2001
Location: USA
Posts: 292
toolswizard is on a distinguished road
Baan: 4c4, 50b, 50c, ERP ln - DB: Informix, Oracle, Sql - OS: Unix, NT, AIX
Can you supply the code you use to zoom to the lines session?
Reply With Quote
  #4  
Old 26th July 2004, 16:12
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
Also check your table relations - are these custom header and lines tables?. Is it possible that you have the mode set on your delete reference mode from your Lines Order # to your Header Order # such that it is causing problems. (Or, maybe you made it from header to lines and that is causing the problem?) What are the references and reference modes set to on the tables? Check header and lines.
Reply With Quote
  #5  
Old 26th July 2004, 18:05
veyant veyant is offline
Senior Member
 
Join Date: May 2003
Location: Gurgaon
Posts: 107
veyant is on a distinguished road
Baan: Baan IV/V - DB: Oracle - OS: Unix/AIX
Exclamation

I have not set reference on deletion in tables. these are customized taables. I other strange thing which i observed is that after deleting lines from subsession if i press save and then come back to main session and try to delete header. it works fine and gives no error. But if i have not pressed save button before coming out of subsession after deleting lines, it gives Error 206 if i try to delete Header Record.
__________________
veyant
Reply With Quote
  #6  
Old 26th July 2004, 18:47
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
I agree with toolswizard then - can you post how you do the zooming.
When you say 'when I delete from the header and lines are present i get an error'. Is that error coded by you? Or coming from the DB?
Any code you can post would help us get a picture.
Reply With Quote
Sponsored Links
  #7  
Old 26th July 2004, 19:49
fosterjr's Avatar
fosterjr fosterjr is offline
Member
 
Join Date: Aug 2001
Location: Danbury, CT, USA
Posts: 79
fosterjr is on a distinguished road
Baan: BaanIVc3,Ivc4 - DB: Oracle 9i, SQLServer 2000 - OS: HP-UX 11i, MSWindows
Are these new tables? If so you should add references to them.
In Maintain Table Definitions, Click on fields. Go to the detail for the fields and enter a reference table. In your case, Maintain Table definitions for your lines table, for the order field reference your order header table. I would set the reference mode to "mandatory" Once you have the reference created, I would go back to the header table and set the delete mode to either "Child will be deleted" or "Restricted" Don't forget to run your Convert to Runtime Data Dictionary with the reconfigure flag set. Then log out and back in.

Quote:
Originally Posted by veyant
I have not set reference on deletion in tables. these are customized taables. I other strange thing which i observed is that after deleting lines from subsession if i press save and then come back to main session and try to delete header. it works fine and gives no error. But if i have not pressed save button before coming out of subsession after deleting lines, it gives Error 206 if i try to delete Header Record.
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
getting error - record not locked on main table shuklan Tools Development 4 11th October 2003 08:27
Record is locked srkallam Tools Development 4 20th August 2002 21:24
Error 206 (Record is not Locked) Abuibra Tools Administration & Installation 2 15th August 2002 13:18


All times are GMT +2. The time now is 02:39.


©2001-2018 - Baanboard.com - Baanforums.com