Set Database File Property

You can use setProperty to specify the database file name created in the Documents directory of the application, on the device or simulator.

Reviewers:
Hung Hsi, Xu-dong Liu, Daniel Huang, Liang-fei Su, Webster Zhang, Gopi, Sam Li, Hao Xu, David Cui. CR 634649-3, SQLite DB on SD card (WM only). Confirmed with Sam & team this topic should remain, and NOT removed for CR 646758-2
SUPConnectionProfile *cp = [SUP101SUP101DB getConnectionProfile];
[cp setString:@"databaseFile":@"newDatabaseFileName"];

Usage

  • Be sure to call this API before the database is created..
  • The database is SQLite; use a database file name like mydb.db.
  • 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.
Reviewers:
mquisenb, 1/10/12: CR #686355 moved SD card info out of RB for Sybase Mobile SDK 2.1 ESD#1 into ESD#2 Dev Guides. Check all SD card conditions - no SD card for iOS..