Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem trying to connect to an UltraLiteJ Database stored on SDCARD Android Device

32 views
Skip to first unread message

alvasrey

unread,
Sep 18, 2012, 2:55:34 PM9/18/12
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());
}
}
0 new messages