Hello,
Your code looks good to me.
You should report an issue here: https://github.com/xerial/sqlite-jdbc
Regards.

On Mon, Dec 14, 2015 at 8:38 PM, Cecil Westerhof <cldwesterhof at gmail.com> 
wrote:
> I have the following code:
> import java.sql.Connection;
> import java.sql.DriverManager;
> import java.sql.Statement;
> import java.sql.SQLException;
>
>
> public class CheckProverbsLocked {
>     private CheckProverbsLocked() {
>     }
>
>     public static void main(String [] args) throws Exception {
>         Connection   conn;
>         Statement    stmt;
>
>         Class.forName("org.sqlite.JDBC");
>         conn = DriverManager.getConnection("jdbc:sqlite:proverbs.sqlite");
>         stmt  = conn.createStatement();
>         try {
>             stmt.executeUpdate("begin immediate");
>         } catch (SQLException e) {
>             System.out.println(e.getErrorCode());
>             System.out.println(e.getMessage());
>             System.out.println(e.getSQLState());
>         }
>         stmt.close();
>         conn.close();
>     }
>
> }
>
>
> I get the following output when the database is locked:
> 0
> database is locked
> null
>
> I would expect the first one to be 5. What am I doing wrong?
>
> --
> Cecil Westerhof
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to