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 » How do i commit the data when an exception occurs

Post new topic  Reply to topic
 How do i commit the data when an exception occurs « View previous topic :: View next topic » 
Author Message
sachinramesh
PostPosted: Thu Jun 26, 2008 11:33 pm    Post subject: How do i commit the data when an exception occurs Reply with quote

Disciple

Joined: 20 Feb 2007
Posts: 170

HI
I had a flow which has an mqi/p ,compute and an mqo/p node.

I am trying to insert some records into a particular table ..
my problem is when i am tring to insert 5 records into the table i am getting an exception at the third record and i am not able to insert any of the records into the table

I want the first two records to get inserted into the table even if i get an exception at the 3rd record.

how do i do this?
i had tried setting the the transaction mode property in the compute node to COMMIT.But still none of the records are getting inserted

Is there any other property that i am missing out here.

i am working MB 5.0 on windows..
Back to top
View user's profile Send private message Send e-mail
Gaya3
PostPosted: Thu Jun 26, 2008 11:38 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

you can use a try catch node and perform the same or

you can perform commit for each trasaction with Data base. or

write good exceptional handling scenario for the same.
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
sachinramesh
PostPosted: Fri Jun 27, 2008 1:09 am    Post subject: Reply with quote

Disciple

Joined: 20 Feb 2007
Posts: 170

Gaya3 wrote:
you can use a try catch node and perform the same or

you can perform commit for each trasaction with Data base. or

write good exceptional handling scenario for the same.



How can i use commit statement in ESQL?
Back to top
View user's profile Send private message Send e-mail
fschofer
PostPosted: Fri Jun 27, 2008 2:25 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,
simply

COMMIT;

but keep in mind that you are commiting all transactions including for example the message which started your flow.

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
sachinramesh
PostPosted: Fri Jun 27, 2008 2:38 am    Post subject: Reply with quote

Disciple

Joined: 20 Feb 2007
Posts: 170

fschofer wrote:
Hi,
simply

COMMIT;

but keep in mind that you are commiting all transactions including for example the message which started your flow.

Greetings
Frank



Hi,

If i am saying simply COMMIT; in the esql code
i am getting a syntax error : Valid options include ::

the code is

WHILE (count <= record_count) DO


SET empno = InputBody.Records[count].eno;
SET empname = InputBody.Records[count].ename;
SET salmonth =InputBody.Records[count].month;
SET sal = InputBody.Records[count].salary;



INSERT INTO Database.sample(ENO,ENAME,MONTH,SALARY ) VALUES (empno,empname,salmonth,sal );

COMMIT;
set count = count + 1;







END WHILE;



RETURN TRUE;
END;
Back to top
View user's profile Send private message Send e-mail
Gaya3
PostPosted: Fri Jun 27, 2008 3:14 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

use

passthru('commit')
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
sachinramesh
PostPosted: Fri Jun 27, 2008 3:27 am    Post subject: Reply with quote

Disciple

Joined: 20 Feb 2007
Posts: 170

Gaya3 wrote:
use

passthru('commit')



Thanks Gayatri and fschofer
its working fine now.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How do i commit the data when an exception occurs
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.