on 11-12-2007 9:40 AM
In receiver jdbc, I insert multiple rows in a table.
My payload for jdbc adapter is
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:FMS_shipmentInfo xmlns:ns1="http://cts.com/fms_update">
- <ShipmentInfo>
- <InsertStmt action="INSERT">
<table>KmFuelTrace</table>
- <access>
<ResourceNo>M1D9GuKVQq</ResourceNo>
<ShipmentNo>0000011087</ShipmentNo>
<Weight>250</Weight>
<StartDate>20070827</StartDate>
<OdometerStart>Constant</OdometerStart>
<OdometerEnd>Constant</OdometerEnd>
<FuelCtrStart>Constant</FuelCtrStart>
<FuelCtrEnd>Constant</FuelCtrEnd>
</access>
</InsertStmt>
- <InsertStmt action="INSERT">
<table>KmFuelTrace</table>
- <access>
<ResourceNo>2h0{sX6MBq</ResourceNo>
<ShipmentNo>0000011081</ShipmentNo>
<Weight>325</Weight>
<StartDate>20071029</StartDate>
<OdometerStart>Constant</OdometerStart>
<OdometerEnd>Constant</OdometerEnd>
<FuelCtrStart>Constant</FuelCtrStart>
<FuelCtrEnd>Constant</FuelCtrEnd>
</access>
</InsertStmt>
</ShipmentInfo>
</ns1:FMS_shipmentInfo>
Eventhough a insertstatement is created for all the records, only one record gets
inserted. Is there anything wrong in the xml structure. or what might be the reason for this?
Aarthi,
If u are operating on the same table and with same action, then use multiple access in a single statement rather than multiple statements.
Regards,
Sudharshan N A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for all your responses. My problem is solved now with multiple access nodes within a single insert statement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:FMS_shipmentInfo xmlns:ns1="http://cts.com/fms_update">
- <ShipmentInfo>
- <InsertStmt action="INSERT">
<table>KmFuelTrace</table>
- <access>
<ResourceNo>M1D9GuKVQq</ResourceNo>
<ShipmentNo>0000011087</ShipmentNo>
<Weight>250</Weight>
<StartDate>20070827</StartDate>
<OdometerStart>Constant</OdometerStart>
<OdometerEnd>Constant</OdometerEnd>
<FuelCtrStart>Constant</FuelCtrStart>
<FuelCtrEnd>Constant</FuelCtrEnd>
</access>
</InsertStmt>
<b></ShipmentInfo>
<ShipmentInfo></b>- <InsertStmt action="INSERT">
<table>KmFuelTrace</table>
- <access>
<ResourceNo>2h0{sX6MBq</ResourceNo>
<ShipmentNo>0000011081</ShipmentNo>
<Weight>325</Weight>
<StartDate>20071029</StartDate>
<OdometerStart>Constant</OdometerStart>
<OdometerEnd>Constant</OdometerEnd>
<FuelCtrStart>Constant</FuelCtrStart>
<FuelCtrEnd>Constant</FuelCtrEnd>
</access>
</InsertStmt>
</ShipmentInfo>
</ns1:FMS_shipmentInfo>
Try with this XML structure or multiple access nodes with in a single InsertStmt.
Regards,
Jai Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.