execute_insert_auto_inc

The execute_insert_auto_inc method executes an auto-incremented column statement handle prepared by the prepare_insert_auto_inc method.

Method Synopsis

NCP::DBI_Factory::execute_insert_auto_inc($dbHandle,$statementHandle,
 $values)

Parameters

$dbHandle
Specifies the DBI handle returned in a previous call to the createDbHandle method. This handle supplies the context for connecting to the specified NCIM topology database.
$statementHandel
Specifies the statement handle returned in a previous call to the prepare_insert_auto_inc method.
$values
Specifies the values to be executed.

Description

The execute_insert_auto_inc method executes an auto-incremented column statement handle prepared by the prepare_insert_auto_inc method.

Notes

To ensure that the execute_insert_auto_inc method can print appropriate messages to a log file, you must have previously specified a log handle (that is, a reference to a file object) by calling the setLogHandle method. Otherwise, the method sends these messages to STDOUT.

Example Usage

The following code example illustrates a typical call to the execute_insert_auto_inc method:

    my $newId2 = NCP::DBI_Factory::execute_insert_auto_inc($dbh, $sth, @values)
		or print "Insert failed ", $dbh->errstr "\n";

Returns

Upon completion, the execute_insert_auto_inc method returns the new auto-incremented value.

See Also