commit
void sqlDataManager.commit ( String table ) (professional and enterprise editions only)
Description
Commit a prepared row of data into queue. Once called the data can no longer be edited. When working with multiple tables that relate by a foreign key, it is important to commit rows in the correct order. The rows in each of the child tables should be committed before the parent, or they will not be correctly linked when written to the database.
This does not write the row of data to the database, but rather puts it in queue to be written at a later time.
Parameters
- table Name of the database table that the data corresponds to, as a string.
Return Values
Returns void.
Change Log
Version | Description |
---|---|
5.0 | Available for professional and enterprise editions. |
Examples
Commit Database Row
// Get datamanager
dm = session.getv( "DATAMANAGER" );
// Add session variables into person table
dm.addSessionVariables( "person" );
// Create and add query to buffer
dm.commit( "person" );
dm = session.getv( "DATAMANAGER" );
// Add session variables into person table
dm.addSessionVariables( "person" );
// Create and add query to buffer
dm.commit( "person" );
See Also
- flush() [SqlDataManager] - Writes committed rows to the database
- commitAll() [SqlDataManager] - Commits all prepared rows of data to the queue to be updated in the database
scraper on 07/16/2010 at 5:23 pm
- Printer-friendly version
- Login or register to post comments