on 08-27-2012 6:31 PM
Hi,
I need to perform Delete all existing records from a table (statement1) and Insert the new set of records into the same table (statement2). And in order to improve the performance, I've tried to use sqlBindMode in the JDBC receiver adapter. But, sqlBindMode is throwing the below error for delete statement. Is it because the delete statement missing the where clause? Any idea how this can be fixed?
(structure 'Statement_Delete'): java.lang.NullPointerException: while trying to invoke the method java.util.ArrayList.size() of an object loaded from local variable 'whereArray'
Thanks
Thanks for the details, Greg. But, unfortunately I don't have to access service marketplace now. And I've not checked 'Database Auto-Commit-Enabled'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please make sure there is no case sensitive issues in your configuration
SAP Note 1404778 - Description
To leverage the Bind variables functionality in JDBC Adapter, we have an option in the advanced option table #sqlBindMode# (This is case sensitive and value of this option should be #true# or #false# without quotes) in the receiver channel configuration.
We can use bind variables for those payloads that are similar in modifying/querying the fields. Every action tag for single table has to be exactly similar in modifying/querying column fields. We can not use bind variables if two action tags are not accessing/modifying the same columns, although two action tags referring to a single table.
This option should be used only for UPDATE, INSERT, DELETE and SELECT Action types and shouldn#t be used with other action types(like UPDATE_INSERT, SQL EXECUTE).
Hi,
You just suggested me some idea. Maybe your receiver structure for DELETE statement is not in agreement with PI expecatations? Have a look at the examples in SAP Help here to verify:
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Regards,
Greg
> bcoz in delete statement no column name is mentioned whereas in insert column names are specificed??
I dont understand this. You specify ? for column names irrespective of delete or insert statements, right? This should work for both. As per SAP notes this should work as explained. Please provide examples. At the same time I don't see any document/blog related to preparedstatement vs jdbc adapter scenario. You might want to check with SAP about this.
Hi,
Have a look at SAP Note 1404778 - Prepared Statement usage in JDBC Reciever Adapter, which descibes the sqlBindMode in details. Additionally, make sure you are not using the "Database Auto-Commit-Enabled(No Transaction Handling)" option, since it should be disabled when using sqlBindMode (refer to Note 831162).
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.