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 » Mapping Node with SQL Server identity primary key

Post new topic  Reply to topic
 Mapping Node with SQL Server identity primary key « View previous topic :: View next topic » 
Author Message
dianmushkov
PostPosted: Wed May 22, 2013 9:57 pm    Post subject: Mapping Node with SQL Server identity primary key Reply with quote

Newbie

Joined: 09 May 2013
Posts: 9

What is the concept with identity primary key and mapping node.
How could I get value of inserted identity.

I guess I can make select statement after mapping node but I believe more elegant solution exists.
Back to top
View user's profile Send private message
kash3338
PostPosted: Thu May 23, 2013 5:28 am    Post subject: Re: Mapping Node with SQL Server identity primary key Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

dianmushkov wrote:
What is the concept with identity primary key and mapping node.
How could I get value of inserted identity.


Make use of a Stored Procedure to do your DB insert and with the help of SCOPE_IDENTITY() you will be able to get the ID of the last record inserted by the same code context in which it executes.

Invoke the Stored Procedure and get the value returned to your flow. To invoke a Stored Procedure using mapping node, refer here
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu May 23, 2013 6:49 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Nothing wrong with the stored procedure solution...but the Mapping node cannot call a stored procedure. You would need to call out to ESQL for that.
Back to top
View user's profile Send private message
kash3338
PostPosted: Thu May 23, 2013 6:59 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Oh I missed out on the product type mentioned by the OP. SQL Server Stored Proc cannot be invoked using a mapping node, but the below statement needs to be tuned a bit,

kimbert wrote:
but the Mapping node cannot call a stored procedure.


but the Mapping node cannot call a stored procedure, other than DB2 and Oracle. Here is the link to it (same as above).
Back to top
View user's profile Send private message Send e-mail
dianmushkov
PostPosted: Sun May 26, 2013 11:47 pm    Post subject: Reply with quote

Newbie

Joined: 09 May 2013
Posts: 9

10x for support
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 » Mapping Node with SQL Server identity primary key
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.