• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use RMS in mobile application

 
Deepesh Singh Rewa
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepesh singh wrote: how to use RMS in mobile application.please give me code.
 
Gopinath Karyadath
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Please read this article

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


gopi@c2info.com
 
Tukaram Kanade
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic