in reply to SQLite Windows readonl databasey

Hello Anonymous Monk,

I was reading around on the Internet regarding your problem and one of the users says that he resolved it by removing the AutoCommit=>0 from the DBI->connect().

Can you give it a try and let us know if it works for you? It can benefit other users on the future possibly.

Looking forward to your update, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^2: SQLite Windows readonl databasey
by Anonymous Monk on Aug 24, 2018 at 08:01 UTC

    Thank you for your reply.

    After some experimenting, this is what I have noted:

    • Changing to AutoCommit=>0 does not solve the Problem, I still get the same error
    • I have now noted that the same error is given even if I try to read the database, for example with my $sth = $dbh->prepare("SELECT * FROM DatabaseInfo WHERE ID='1'");!!!

      Hello again Anonymous Monk,

      You need to remove it completely not set it to zero. As I said this is an assumption based on what I read.

      Hope this helps, BR.

      Seeking for Perl wisdom...on the process of learning...not there...yet!
        Somehow, to me, this looks like Cargo cult programming.

        The only mention of autocommit in SQLite docs is this, which says

        Autocommit mode is on by default. Autocommit mode is disabled by a BEGIN statement. Autocommit mode is re-enabled by a COMMIT or ROLLBACK.
        Basically this makes me think SQLite would ignore any attempt of the application to set such a flag.

        Update: Of course, were it MySQL, your findings would be plausible...