addData

void sqlDataManager.addData ( String table, Map data ) (professional and enterprise editions only)
void sqlDataManager.addData ( String table, String columnName, Object value ) (professional and enterprise editions only)

Description

Add data to fields, in preparation for insertion into a database.

Parameters

  • table Name of the database table that the data corresponds to, as a string.
  • data (this or columnName and value) Map using field names as keys to desired values to be added in the database for fields. This can be a dataRecord object.
  • columnName (requires value) The name of the column/field in the database table that the data is being added for, as a string.
  • value (requires columnName) The value being inserted into the column/field.

Return Values

Returns void.

Change Log

Version Description
5.0 Available for professional and enterprise editions.

Examples

Add Data from Data Record

 // Get datamanager
 dm = session.getv( "DATAMANAGER" );

 // Add DataRecord Information into person table
 dm.addData( "person", dataRecord );

 // Create and add query to buffer
 dm.commit( "person" );

Add Data In a Specific Field

 // Get datamanager
 dm = session.getv( "DATAMANAGER" );

 // Add DataRecord Information into person table
 dm.addData( "person", dataRecord );

 // Add Specific Other Data
 dm.addData( "person", "date_collected", "2010-07-13" );

 // Create and add query to buffer
 dm.commit( "person" );