|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Database commit |
« View previous topic :: View next topic » |
Author |
Message
|
protocol |
Posted: Wed Feb 09, 2011 8:18 am Post subject: Database commit |
|
|
 Apprentice
Joined: 25 Feb 2005 Posts: 41
|
All,
We are using WMB v7000.
We have a compute node to update a SQL Server DB. The requirement is that the incoming xml has a repeating structure. I read the first occurrence and insert into the table. If the second or higher occurrences match some of the fields in the first occurrence, we have to update the table.
I have a WHILE loop and do a insert for the first occurence, and a SELECT for the other occurrences to see if an INSERT/UPDATE is required.
Sometimes, what is happening is that, after the first INSERT, when we do a SELECT in the WHILE loop for the second occurence, it doesnt seem to identify the first INSERT. I think it's because the first INSERT did not get committed.
Is my understanding correct?
Reading through this forum, I read somewhere that a PASSTHRU('COMMIT') after the INSERT would help. Is that the right approach?
Thanks in advance! |
|
Back to top |
|
 |
fatherjack |
Posted: Wed Feb 09, 2011 8:22 am Post subject: |
|
|
 Knight
Joined: 14 Apr 2010 Posts: 522 Location: Craggy Island
|
Why even bother inserting it into the datrabase if you're going to update it later. Why not just build your database row in your Environment or LocalEnvironment, update it there and then insert at the very end. _________________ Never let the facts get in the way of a good theory. |
|
Back to top |
|
 |
zpat |
Posted: Wed Feb 09, 2011 8:40 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Upgrading to 7002 is advisable in any event. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|