| Author |
how to use RMS in mobile application
|
Deepesh Singh Rewa
Greenhorn
Joined: Feb 19, 2010
Posts: 1
|
|
Deepesh singh wrote: how to use RMS in mobile application.please give me code.
|
 |
Gopinath Karyadath
Ranch Hand
Joined: Oct 14, 2009
Posts: 87
|
|
Please read this article
http://www.ibm.com/developerworks/library/wi-rms/
gopi@c2info.com
|
 |
Tukaram Kanade
Ranch Hand
Joined: Feb 18, 2010
Posts: 39
|
|
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
Joined: Oct 14, 2009
Posts: 87
|
|
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
|
 |
 |
|
|
subject: how to use RMS in mobile application
|
|
|