I am trying to write a java code which will insert multiple rows into a oracle table.
I saw the insert sql method in wM java API- public Values insert(java.lang.String table, Values[] data,
boolean rollbackOnFail)
Now I have a IData array in service input, could you pls let me know how to convert this input IData array to Values array for this insert method input.
thnaks for your reply. I am trying to call different databases depending on sender id and cant change JDBC connection dynamically for 6.1 so need to write these java code.
I’d offer that you don’t “need” to write this in Java. Another approach would be to create the connections to the different databases and then create the JDBC services as needed for each. This probably will result in duplicate services, but IMO is a far better scenario than managing JDBC within Java. And it also sets you up for the future with 6.5 where dynamic control of the connection to use is possible.
we thought of that, problem is we have 3 target systems and each has 3/4 test enviroments and we need to switch very often. this is mainly require for testing, i am planning to keep adapter services in Prod.
BTW, if anybody knows about DB2 DB url pls let me know.
I am using these in adapter connection -
DataSource Class- com.ibm.as400.access.AS400JDBCDataSource
ServerName -
user -
password -
Other Properties - libraries=;transaction isolation=none;prompt=false
“we have 3 target systems and each has 3/4 test enviroments”
This might be better facilitated by using multiple JDBC connections as well. It would make switching which DB a particular connection is using (test1, test2, etc.) very quick and easy.
But clearly I don’t have all the details, so what I’m suggesting may not be effective.