Author |
Message
|
jeevan_p |
Posted: Tue Mar 21, 2006 10:43 pm Post subject: Error processing a heirarchical BO-JDBC Connector |
|
|
Novice
Joined: 02 Mar 2006 Posts: 11 Location: India
|
Hi,
I m trying to insert into 2 tables in the datasase(db2) by sending a heirarchical BO.
I have created both BOs using ODA from the 2 tables wherin i want to insert.
To relate the 2 tables i have kept a foriegn key in another table and even i have set the application specific data ie( FK=table.id )
Entries are going into one table but whatever i send in the child Bo are not entered into the other table which contains the foreign key.
jdbc connector throws following error
[Time: 2006/03/22 12:10:33.109] [System: ConnectorAgent] [SS: JDBCConnector] [Th
read: WT=0 (#1130015665)] [Type: Error] [MsgID: 10556] [Mesg: Exception Detail:
com.crossworlds.cwconnectorapi.exceptions.VerbProcessingFailedException
[Type: Error] [MsgID: 37004] [Mesg: Execution of Prepared Update Statement Faile
d : COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0104N An unexpe
cted token "END-OF-STATEMENT" was found following "ert into ADDRESS(PID". Expec
ted tokens may include: "JOIN <joined_table>". SQLSTATE=42601
] ] |
|
Back to top |
|
 |
SpitFire |
Posted: Tue Mar 21, 2006 10:55 pm Post subject: Structure of tables |
|
|
 Acolyte
Joined: 01 Aug 2005 Posts: 59 Location: India
|
Can you please post the structure of the tables/BO, so that we can understand what you are trying to do? _________________ ...: 5|71+ph1|23 :... |
|
Back to top |
|
 |
jeevan_p |
Posted: Tue Mar 21, 2006 11:04 pm Post subject: |
|
|
Novice
Joined: 02 Mar 2006 Posts: 11 Location: India
|
The table structures and bo structure :
Column Type Type
name schema name Length Scale Nulls
------------------------------ --------- ------------------ -------- ----- -----
-
PID SYSIBM INTEGER 4 0 No
NAME SYSIBM VARCHAR 10 0 Yes
Column Type Type
name schema name Length Scale Nulls
------------------------------ --------- ------------------ -------- ----- -----
-
PID SYSIBM INTEGER 4 0 No
ADDID SYSIBM INTEGER 4 0 No
ADDRESS1 SYSIBM VARCHAR 10 0 Yes
ADDRESS2 SYSIBM VARCHAR 10 0 Yes
<StartHeader>
<Version = 3.0>
<EndHeader>
<StartBO:PERSON>
BusinessObject = PERSON
Verb = Create
Locale = en
PID = 1
NAME = dsd
<StartChild>
ADDRESS = 1
<StartBO:ADDRESS>
BusinessObject = ADDRESS
Verb = Create
Locale = en_US
PID = 1
ADDID = 12
ADDRESS1 = sa
ADDRESS2 = dsds
ObjectEventId = CxIgnore
<EndBO:ADDRESS>
<EndChild>
ObjectEventId = CxIgnore
<EndBO:PERSON> |
|
Back to top |
|
 |
sdng |
Posted: Wed Mar 22, 2006 12:02 am Post subject: |
|
|
Acolyte
Joined: 23 Nov 2005 Posts: 53
|
Hi,
it will be better if you post structure bo (with app info), but not the example of data.
you say that you set FK=table.key, you should use FK=bo.key (if you use single cardinality) _________________ Are you gangsters? No, we are Russians! |
|
Back to top |
|
 |
jeevan_p |
Posted: Wed Mar 22, 2006 12:35 am Post subject: |
|
|
Novice
Joined: 02 Mar 2006 Posts: 11 Location: India
|
Bo Structure
1 PID Integer 1 0 0 CN=PID
2 NAME String 0 0 0 10 CN=NAME
3 ADDRESS ADDRESS 0 0 0 1
3.1 PID Integer 0 0 1 CN=PID ; FK=PERSON.PID
3.2 ADDID Integer 1 0 0 CN=ADDID
3.3 ADDRESS1 String 0 0 0 10 CN=ADDRESS1
3.4 ADDRESS2 String 0 0 0 10 CN=ADDRESS2
3.5 ObjectEventId String
4 ObjectEventId String
5 0 0 0 255 |
|
Back to top |
|
 |
vk |
Posted: Wed Mar 22, 2006 5:57 am Post subject: |
|
|
Partisan
Joined: 20 Sep 2005 Posts: 302 Location: Houston
|
Quote: |
<StartBO:ADDRESS>
BusinessObject = ADDRESS
Verb = Create
Locale = en_US |
The verb for child BOs shold be set to CxBlank. With this setting I am able to insert both the parent and child records into the table.
Quote: |
CN=PID ; FK=PERSON.PID |
The delimiter between application specific information is a colon ':' not a semicolon ';'. Also you might want to try removing the spaces before and after the delimiter.
Regards,
VK. |
|
Back to top |
|
 |
sdng |
Posted: Wed Mar 22, 2006 8:18 am Post subject: |
|
|
Acolyte
Joined: 23 Nov 2005 Posts: 53
|
)
if you set fk in child bo you shoul set only parent bo pk (i dont remember but may be in this way cardinality must be N)
fk=bo.key use in parent bo _________________ Are you gangsters? No, we are Russians! |
|
Back to top |
|
 |
jeevan_p |
Posted: Wed Mar 22, 2006 9:29 pm Post subject: |
|
|
Novice
Joined: 02 Mar 2006 Posts: 11 Location: India
|
Thanks guys its working for create , retrieve and delete . Delimiter was a problem , thanks once again |
|
Back to top |
|
 |
|