commit

commit is used to make the changes permanent for databases that support this function. On MySQL, transactions are currently not supported, so the commit function does nothing. Once MySQL gets transaction capability, this function will most likely be updated to work with the MySQL DBD.

Example:

$return_code = $query_handle->commit;

The above preceding example attempts to commit the most recent changes to the database. If there is a problem, an error code will be retuned and stored in $return_code.

Also, commit works only when Autocommit is turned off. Autocommit is a flag used in the connect statement on databases that support it. Autocommit will automatically commit changes as they occur if it is enabled.



Perl Database Programming
Perl Database Programming
ISBN: 0764549561
EAN: 2147483647
Year: 2001
Pages: 175

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net