on 07-06-2007 12:19 PM
Hi,
I have a JMS to JDBC interface. While this is straightforward enough, there is a requirement to clear the contents of the table before carrying out the insert
What I've tried is:
<MT_Message>
<Statement>
<TableClear>
<action> .....attribute mapped to SQL_DML
<access> ....element mapped to DELETE FROM table
<TableInsert>
<action> .....attribute mapped INSERT constant
<table> ......element mapped to Table name
<access> ...allthe fields in the table
The DELETE statement works and the Insert statement work but they won't work together. Is this possible at all? What other options are there in this case?
Damien,
Try 2 different Statement level tags one each for Delete and Insert. The other easy option would be calling a stored procedure which does the task.
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.
I went for two different Statement tags so the structure of the Message Type is:
<MT_Message>
<StatementDelete>
<TableClear>
<action> ....attribute mapped to SQL_DML
<access> ...element mapped to DELETE FROM Table
<StatementInsert>
<TableInsert>
<action> ....attribute mapped to INSERT constant
<table> ....element mapped to table name
<access> ...all the columns in my table
Hi;
If i am not wront then you want the delete and the insert to take place in a single transaction . If some error occours while insert then delete also gets rolled back.
this will be done if you have
<Delete1>
<dbTableName action=DELETE>
<Insert1>
<dbTableName action=INSERT>
Mudit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.