I've been trying so hard to connect to an UltraLite database stored on sdcard Android device. The error thrown is : Error J[-405], cannot create database "/mnt/sdcard/Android/data/Pedido_hh.udb". But I want to connect to that database and it always tries to create a new one. This is a part of the code used : String dbPath = Environment.getExternalStorageDirectory().getPath() + "/Android/data/Pedido_hh.udb"; try{ // Define the database properties using a Configuration object ConfigFileAndroid config = DatabaseManager.createConfigurationFileAndroid(dbPath, this); // Connect, or if the database does not exist, create it and connect Connection _conn; try{ _conn = DatabaseManager.connect(config); } catch ( ULjException e) { _conn = DatabaseManager.createDatabase(config); } } catch ( ULjException e) { Log.e("HelloUltraLite", e.toString()); } } Also I'd Like to know how can I create an UltraLiteJ Database using my PC and then use it on my Android Device. PD: I'm using SQL Server AnyWhere 12.0.1 and Eclipse y SDK 2.2 asked 20 Sep '12, 12:09 alvasrey |
Andy Quick says this:
The application looks like it is failing to create the database, and then having to try again each time. answered 20 Sep '12, 12:45 Tom Slee thanks a lot now a I can connect to my database!!!!!
(20 Sep '12, 15:34)
alvasrey
|