I saw that you did some tests on Android. When I try to run my test with H2, I get a FileNotFoundException. I am trying to use the built-in usage mode, and here is my code snippet:
String url = "jdbc:h2:~/myTestDB" + ";FILE_LOCK=FS" + ";PAGE_SIZE=1024"
+ ";CACHE_SIZE=8192";
Class.forName("org.h2.Driver");
return DriverManager.getConnection(url, "sa", "");
I also tried:
String url = "jdbc:h2:/data/data/" + "com.mydomain.MyApp"
+ "/data/myTestDB" + ";FILE_LOCK=FS" + ";PAGE_SIZE=1024"
+ ";CACHE_SIZE=8192";
but no luck.
I placed myTest.h2.db in the / assets folder of my Android project. If you can post your sample code, that would be great!
thank
source
share