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 Interchange Server + Adapters » Error Updating Multiple tables through Parent Child Relation

Post new topic  Reply to topic
 Error Updating Multiple tables through Parent Child Relation « View previous topic :: View next topic » 
Author Message
sourdas2
PostPosted: Tue Jan 09, 2007 9:53 pm    Post subject: Error Updating Multiple tables through Parent Child Relation Reply with quote

Voyager

Joined: 21 Apr 2006
Posts: 90
Location: Kolkata,India

Hi,
I am using WBI JDBC Adapter 2.6.0.5.
My BO structure is
Quote:

Dummy_key1 String 1 0 0 255 DummyKey
Dummy_key2 String 1 0 0 255 DummyKey

PURCHASE_ORDER KEEP_RELATIONSHIP=TRUE
PURCHASEORDERNBR String 1 0 0 100 CN=PURCHASE_ORDER_NBR:FK=PO_WRAPPER.Dummy_key1
COMMODITYCD String 0 0 0 16 CN=COMMODITY_CD
COMMODITYDSC String 0 0 0 128 CN=COMMODITY_DSC
SITEID String 1 0 0 8 CN=SITE_ID:FK=PO_WRAPPER.Dummy_key2

PO_DETAIL[N] KEEP_RELATIONSHIP=TRUE
PURCHASEORDERNBR String 1 1 0 100 CN=PURCHASE_ORDER_NBR:FK=PURCHASE_ORDER.PURCHASEORDERNBR
CHANGEID String 0 0 0 10 CN=CHANGE_ID
DELETEFLG String 0 0 0 1 CN=DELETE_FLG
SITEID String 0 0 0 8 CN=SITE_ID

My data is
Quote:

[Mesg: :<StartHeader>
<Version = 3.0>
<EndHeader>
<StartBO:PO_WRAPPER>

BusinessObject = PO_WRAPPER
Verb = Update
Locale = en_US

Dummy_key1 = 55003806
Dummy_key2 = 0342
<StartChild>
PURCHASE_ORDER = 1

<StartBO:PURCHASE_ORDER>
BusinessObject = PURCHASE_ORDER
Verb = CxBlank
Locale = en_US

PURCHASEORDERNBR = 55003806
POINEFFECTIVEDT = 12/31/9999
COMMODITYCD = 999
COMMODITYDSC = Inter/Intra Comp.
SITEID = 0342
<StartChild>
PO_DETAIL = 1

<StartBO:PO_DETAIL>
BusinessObject = PO_DETAIL
Verb = CxBlank
Locale = en_US

PURCHASEORDERNBR = 55003806
CHANGEID = MQSI
DELETEFLG = S
SITEID = 0342
ObjectEventId = CxIgnore
<EndBO:PO_DETAIL>
<EndChild>
ObjectEventId = CxIgnore
<EndBO:PURCHASE_ORDER>
<EndChild>
ObjectEventId = CxIgnore

<EndBO:PO_WRAPPER>]


The verb is always Update in Wrapper BO. So when there is no record in table insert opration is sucessful. But when there is a record in table i.e incase of update it is throwing an error - com.crossworlds.cwconnectorapi.exceptions.VerbProcessingFailedException: [Type: Error] [MsgID: 34019] [Mesg: Wrong attribute found at SITEID for object PURCHASE_ORDER.]. I can not understand where i have gone wrong. Please reply.
_________________
Thanks and Warm Regards
Sourav
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
boogey
PostPosted: Mon May 14, 2007 9:46 am    Post subject: Reply with quote

Novice

Joined: 01 Jan 2007
Posts: 21

Hi,
I need to inert into database if the record doesn't exist,if it exist ,need to update the database using wrapper business object which contains two child objects .Can you please tell me how to achieve this?
Back to top
View user's profile Send private message
sourdas2
PostPosted: Mon May 14, 2007 8:40 pm    Post subject: Reply with quote

Voyager

Joined: 21 Apr 2006
Posts: 90
Location: Kolkata,India

To implement your scenario -
There would be two dumy key in the wrapper object. each dummy key corresponds to forign key of each child table object. You have to link the child tables by keep relationship=true and with forign key relationship with wrapper key. The verb of the wrapper would be always 'Update'.
_________________
Thanks and Warm Regards
Sourav
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Interchange Server + Adapters » Error Updating Multiple tables through Parent Child Relation
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.