ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Database commit

Post new topic  Reply to topic
 Database commit « View previous topic :: View next topic » 
Author Message
protocol
PostPosted: Wed Feb 09, 2011 8:18 am    Post subject: Database commit Reply with quote

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
View user's profile Send private message
fatherjack
PostPosted: Wed Feb 09, 2011 8:22 am    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Wed Feb 09, 2011 8:40 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Upgrading to 7002 is advisable in any event.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Database commit
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.