alvasrey
unread,Sep 18, 2012, 2:55:34 PM9/18/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello 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());
}
}