beginr has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Could anyone please help me. If Autocommit is true, when commit is executed?. Thanks and regards. gabi

Replies are listed 'Best First'.
Re: DBI; Autocommit
by Joost (Canon) on Jun 07, 2006 at 17:20 UTC
Re: DBI; Autocommit
by UnderMine (Friar) on Jun 07, 2006 at 22:03 UTC
    Autocommit true causes DBI to commit after every execute or do of a SQL statement.

    Use of autocommit false requires a database that supports transactions otherwise the commit occurs anyway.

    DDL statements always run in there own transaction and therefor are always committed immediately.

    Hope it helps
    UnderMine

Re: DBI; Autocommit
by hesco (Deacon) on Jun 07, 2006 at 23:00 UTC
    Your question I believe has been answered, but it brings up another I have had about that setting for a while. If you set autocommit => 0 and your dbd is connecting to an engine which does not support transactions, say a flat file, does DBI provide transaction support at its level that covers for the engine below? -- Hugh
    if( $lal && $lol ) { $life++; }
      No.