Execute Query - Insert Statement - ResultObject Error

Hi, I want to perform an insert statement without needing to return any object. However, there’s an error stated the the resultObject must be filled. Solution 1: I tried using (empty) for the resultObject but it will lead to NPE error at resultObject.getMetaObject().  Solution 2: I tried using a temporary object for the resultObject but it will lead to error No results were returned by the query. Question, how do I suppress this resultObject issue? I can’t find any “Advanced” section in the properties pane of the execute query action in the MF. For now I’m using Solution 2 and I set the error handling type to “Continue”. Although it works, but I don’t think this is the best appropriate solution, any ideas?
1 answers

Hi Teoh Ming Sui,
If you want to perform ‘Insert’, Please use “Execute Statement” JavaAction.

The Execute statement action works internally in the same manner as the Execute query action. However, it is used for INSERTUPDATEDELETESTORED PROCEDURE, or DDL statements.

Return value for Execute statement is an integer value, which usually represents the amount of affected rows.