1

i am tryin to use sqlite-jdbc in android but give me error when trying to connect to database. below my code .

   Class .forName("org.sqlite.JDBC").newInstance();
        c = DriverManager.getConnection("jdbc:sqlite:category1.db");
    } catch ( Exception e ) {
        System.err.println( e.getClass().getName() + ": " + e.getMessage() );

    }
    Log.w(TAG,"#######{}{}{}{}{*Opened database successfully");
    System.out.println("Opened database successfully");

this the error when run app.

W/System.err: java.sql.SQLException: opening db: 'category1.db': open failed: EROFS (Read-only file system)

0 Answers0