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 24th October 2002, 07:28
Andron Andron is offline
Junior Member
 
Join Date: Apr 2002
Location: Russia
Posts: 11
Andron is on a distinguished road
Baan: 4 - DB: Informix 10 - OS: AIX
Update in update

It is necessary to make update inside update:

db.retry.point()
select f1, f2, ..., fn from table1 for update
where ......
selectdo
.............
db.update(table1, db.retry)
db.retry.point()
select d1, d2, ...., dn from table2 for update
where ..........
selectdo
..................
db.update(table2, db.retry)
endselect
................
endselect
commit.transaction()

This code is correctly?
Reply With Quote
  #2  
Old 24th October 2002, 08:08
zacharyg's Avatar
zacharyg zacharyg is offline
Member
 
Join Date: Sep 2002
Posts: 62
zacharyg is on a distinguished road
Baan: 4 - DB: 4 - OS: 4
Hello Andron,

I don't believe so because you have already started a transaction with the first db.retry.point(). Why would you want to do the update this way.

I would suggest removing the second db.retry.point() because I assume your two updates are logically one unit of work.
Reply With Quote
Sponsored Links
  #3  
Old 24th October 2002, 08:29
carice's Avatar
carice carice is offline
Member
 
Join Date: Mar 2002
Location: Belgium
Posts: 38
carice is on a distinguished road
Baan: BaanIV; BaanV (5.0;5.1;5.2) - DB: BISAM; ORACLE - OS: WINNT; UNIX
This won't work because you start twice db.retry.point When he has to jump to the db.retry.point the program can't know which db.retry.point he has to go. You can update two tables if you just use one db.retry.point
Reply With Quote
  #4  
Old 24th October 2002, 08:44
Andron Andron is offline
Junior Member
 
Join Date: Apr 2002
Location: Russia
Posts: 11
Andron is on a distinguished road
Baan: 4 - DB: Informix 10 - OS: AIX
Means it is necessary to make so:

db.retry.point()
select f1, f2, ..., fn from table1 for update
where ......
selectdo
.............
db.update(table1, db.retry)
| no db.retry.point this
select d1, d2, ...., dn from table2 for update
where ..........
selectdo
..................
db.update(table2, db.retry)
endselect
................
endselect
commit.transaction()
Reply With Quote
  #5  
Old 24th October 2002, 09:38
zacharyg's Avatar
zacharyg zacharyg is offline
Member
 
Join Date: Sep 2002
Posts: 62
zacharyg is on a distinguished road
Baan: 4 - DB: 4 - OS: 4
Thumbs up

Yes, Andron that's correct.
Reply With Quote
  #6  
Old 26th October 2002, 00:47
baanprog's Avatar
baanprog baanprog is offline
Senior Member
 
Join Date: Jun 2002
Posts: 291
baanprog is on a distinguished road
Baan: BaanIVc4, SP15 - DB: ORACLE 10 - OS: HP-UX 11.11
db.retry.point , db.update and commit.transaction

Plese know that you can set a db.retry.point() and start updating diffrent tables within that db.retry, it only prepares the update data.Physicaly the update will occur only when u commit the transaction with commit.transaction().Knowing this difference is essential for process sessions in which you can have multiple updates and single commit or multiple commits.(you can have dummy commit's too sometimes)
__________________
Things dont work by themselves.We make them Work. Remember whatever systems we create it will have all the defects inherent in us
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
Table update problem Debdas Banerjee Tools Development 3 30th October 2003 19:10
Update sur table Otools Forum francais 8 18th September 2003 17:28
update problem rohan_rege AFS/DDC/OLE: Function servers 14 28th October 2002 22:32
DB. Update issue skommu Tools Development 4 14th October 2002 00:10


All times are GMT +2. The time now is 10:09.


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