Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

how to use RMS in mobile application

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Deepesh singh wrote: how to use RMS in mobile application.please give me code.

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Please read this article

http://www.ibm.com/developerworks/library/wi-rms/


gopi@c2info.com
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

please check the code which i have written for storing data in RMS,

"
RecordStore recordStore;
try{
recordStore = RecordStore.openRecordStore("RecordStore Name", true);
byte[] binary = "Test".getBytes();
recordStore.addRecord(binary, 0, binary.length);
catch(RecordStoreFullException exception){
}
"
 
Gopinath Karyadath
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Try this code and let me know .. it is very interesting topic for newbs
It is the same as what you had ...

// Initialize

RecordStore rs = null ;




// To Open Or Create a Table


rs = openRecordStore("mytable");


public RecordStore openRecordStore(String tablename) {

try {
rs = RecordStore.openRecordStore(tablename, true);
} catch (RecordStoreException ex) {
ex.printStackTrace();
}

return rs ;
}

//To Add in Record Store

writeRecord("Test Data","mytable") ;


public void writeRecord(String str, String tablenames) {

byte[] rec = str.getBytes();
try {
RecordStore.addRecord(rec, 0, rec.length);
} catch (RecordStoreException ex) {
ex.printStackTrace();

}

}

regards
gopi@c2info.com
 
reply
    Bookmark Topic Watch Topic
  • New Topic