RelDBUpdateProcess

Top  Previous  Next

org.moremotion.mmcomp.reldb.RelDBUpdateProcess class existing in mmcomp_reldb.jar extends MoreMotion's org.moremotion.process.Process base class and it is used to update relational data bases with the Update SQL statements given as parameters.

This class is configured as follows.

  <process name="DeleteProduct" basedon="mor.RelDB.RelDBUpdateProcess">
    <param name="conn">SuperStore</param>
    <param name="query">DELETE FROM products WHERE ID = @vof(ID)</param>
  </process>

Parameters

conn (Accepts MScript)

The name of a JDBC connection that is configured with jdbcConnection element.

query (Accepts MScript)

In this parameter one or more update query statements can be defined. The statements can be constructed using MScript.

  INSERT INTO products ('Product1', 12, 33.25);
  @doif(addAnother) 
    INSERT INTO products ('Product2', 20, 40.00);
  @doend()

 
See selecT Query

Stored Procedures:

In addition to the regular update queries you can also make stored procedure calls in this parameter. Depending on the JDBC driver the stored procedure call can be made directly or by enclosing within '{' and '}' characters.

Example:

{call my_stored_procedure} 

 
 

Completion Codes

This Process returns the following completion codes

0 Normal completion
12 An unknown error (probably a JDBC error) is occurred.