http://qs321.pair.com?node_id=798526


in reply to load data to MySQL database using Perl

Set AutoCommit => 1 or call $dbh->commit; before disconnect.

See perldoc DBI about commiting

Replies are listed 'Best First'.
Re^2: load data to MySQL database using Perl
by xieyulong (Initiate) on Oct 02, 2009 at 14:31 UTC

    Yes. Thanks a lot. When I set autocommit from "off" to "on", it worked as expected.

    I checked perldoc DBI about the setting of autocommit when establishing a connection, but did not understand well. In practice in which situation the autocommit should be set to "off" and then call commit to make the transaction take effect.

    Thanks again.