Set Database File Property

You can use setProperty to specify the database file path on the device. If the path you specified starts with "file:///SDCard/" then the database is stored in the SD media card. If the path starts with "file:///store/" then the database is stored in the internal flash. Otherwise, the database is stored in the BlackBerry Object Store.

ConnectionProfile cp = SMP101DB.getConnectionProfile();
cp.setProperty("databaseFile", "SMP101.ulj");
cp.save();

Examples

To store the database on the SD card:

cp.setProperty("databaseFile", "file:///SDCard/mydb.ulj");
Note: For the database file path and name, the forward slash (/) is required as the path delimiter, for example file:///SDCard/dbfiles/smpprj.ulj. .

Usage

  • Be sure to call this API before the database is created..
  • The database is UltraLiteJ; use a database file name like mydb.ulj.
  • If the device client user changes the file name, he or she must make sure the input file name is a valid name and path on the client side.
Note: SAP recommends using industrial grade SD cards using Single Level Cell (SLC) technology. SD cards that use SLC technology are generally more reliable and faster than MLC cards, although they may be more limited in size and more expensive per unit of storage. Not all SD cards perform equally, and it is advised that customers evaluate the benchmarks available from different suppliers.