In an old Java application I have the following code to connect to a SQL database and use it for some queries:
private Connection dbConnection = null;
System.setProperty("derby.system.home", "C:\\");
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
String strUrl = "jdbc:derby:BOOKSDB";
dbConnection = DriverManager.getConnection(strUrl);
Statement stmt = dbConnection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM BOOKS");
Is there any chance to use it on Android? The documentation say that it is possible in general, isn't it? But how can one use it?
Or would it be easier to change this part so that it uses SQLite instead? I think this is much work to do because with SQLite, you always have a cursor instead of a ResultSet and so on ...