Focal Point
[SOLVED] database transaction in iWaySM

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/6977054595

December 16, 2010, 12:53 PM
cokeyng
[SOLVED] database transaction in iWaySM
Hi All,

The process that I created will extract the data from a xml file and insert it row by row using a loop. If each SQL node will have its own db connection, the transaction will not work when the statements are spread across multiple SQL nodes. Right?

Is it possible to have database transaction control within a process? if so, can you provide some instructions?

Thanks

Cokey

This message has been edited. Last edited by: Tamra,


iWay 5.5, 6.01
Windows
all output (Excel, HTML, PDF)
December 16, 2010, 01:18 PM
ray_In_Vancouver
So if one insert fails you want them to all role back?


IWay SM 5.6, 6.01, 6.1, 6.9, 7.0
EDI, XML, XSD, WF 8.0, DM 77,8.0 asp.net, SQL Server
December 16, 2010, 01:36 PM
cokeyng
Hi Ray,

yes, that is what I want.

Cokey


iWay 5.5, 6.01
Windows
all output (Excel, HTML, PDF)
December 16, 2010, 01:45 PM
ray_In_Vancouver
how many loops through the XML data do you suspect?


IWay SM 5.6, 6.01, 6.1, 6.9, 7.0
EDI, XML, XSD, WF 8.0, DM 77,8.0 asp.net, SQL Server
December 17, 2010, 10:53 AM
cokeyng
the xml file is a list of data that should be inserted into a table. So an iterator will split out each record and a sql node will insert it into the database.


iWay 5.5, 6.01
Windows
all output (Excel, HTML, PDF)
December 19, 2010, 12:58 PM
ray_In_Vancouver
I have done this useing SM to put the XML into a sql database (easy to do), then right after your insert use SM to call a Stored Procedure to do what you want. Depending on the size of the XML thats alot of loops. This way you pass off the resources toSQL. The most i have looped throught is 4500 nodes.


IWay SM 5.6, 6.01, 6.1, 6.9, 7.0
EDI, XML, XSD, WF 8.0, DM 77,8.0 asp.net, SQL Server
September 28, 2016, 02:23 PM
DipJen
Hi - How do you access xml, how do you grab that from memory and so that you can pass it to sql.


WebFOCUS 8
Windows, All Outputs
September 30, 2016, 10:59 AM
Tamra
DipJen,

Please review the following response from the iWay group.

iSM 7.0.x release offer various commit options on both the SQL Service and on the JDBC Data Provider which should be used. You also shouldn't need to parse out the incoming document into multiple smaller documents to reiterate on and form the calls to the SQL. The SQL object should be able to take in the whole document which has values for multiple rows and insert them correctly as a bulk.

Let us know if this helps answer your question.

Please update your signature to indicate the version of iWay that you are using.

Thank your for participating in the Focal Point Forum,
Tamra Colangelo
Focal Point Moderator
Information Builders


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5