on 07-13-2008 4:17 PM
Dear experts,
I am new to the xMII, could anybody please tell me how to update several tables in single transaction. Say I want to update table a and b from same DB, commit should only happen when both a and b are updated correctly, can this be done in iCommand or there is other method?
Thanks a lot,
Tony.
Hi.
I would programme it in a Stored Procedure and make the logic in here (in MSSQL make a transaction). And call it from a fixed query, which can be called from a iCommand.
Or you can probably do it in a business logic transaction, but would prefer the above solution.
BR
Poul.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tony,
I would agree with David.. This could be handled at the database level by writing exceptions in a stored procedures. It is easy to implement a "all or nothing" model at the database level than writing the whole logic within xMII business logic transaction. The stored procedure has to return the status back for xMII to evaluate it and then move onto the next step.
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, tony
in my point of view, i think, u can just let the db to handle this, sql server or oracle.
and u can just check the data for updating.
coz the db is designed to handle the commit. it should follow the consistency principle.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tony,
Based on your tables you write command query for update.Suppose you want to update 3 tables. So you write 3 command queries for update.In your transaction you call these 3 command queries.
It will update the 3 tables.
Thanks,
Manisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.