Skip to main content

RMS data lost after deploying the app in mobile

2 replies [Last post]
saira514
Offline
Joined: 2010-07-22
Points: 0

my app saves some data in record store, and simply view it! it works fine in emulator but when i deploy my app to mobile the data is lost. If i save some data in record store while using mobile, the data remains there! but the data saved while using emulator, does not show up when the app is running on mobile.
im using netbeans 6.5, sun wireless toolkit emulator. below is my code:
form1 = new Form("This is RMS DEMO");
Display.getDisplay(this).setCurrent(form1);

rs = RecordStore.openRecordStore("Student1", true);

//Add a record

String rec = "Some text";
byte[] recbyte = rec.getBytes();
rs.addRecord(recbyte, 0, recbyte.length);

//Read records

RecordEnumeration re = rs.enumerateRecords(null, null, false);
while(re.hasNextElement()){
String str = new String(re.nextRecord());
form1.append(str);

Message was edited by: saira514

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
naumanshah
Offline
Joined: 2010-09-24
Points: 0

The data stored on emulator is saved in /appdb which is not part of the package that you deploy on the device that is why it is not available.

Message was edited by: naumanshah

reisneto
Offline
Joined: 2010-07-21
Points: 0

Ok... but

Is there some way to store data o RecordStore and then deploy the application with this data?