dcsimg
RMS: view data saved
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   paolo_cucchi
Posted On:   Monday, June 13, 2005 09:00 AM

When I try to show data saved in a ChoiceGroup, all the data (string) saved are shown as empty field. Why? Thanks Paolo This is the code: SAVING: RecordStore rs = RecordStore.openRecordStore("IpDataList",true); int id = rs.getNextRecordID(); String ip = ipString.getString(); byte[] bytes = ip.getBytes(); rs.addRecord(bytes,id,bytes.length); rs.closeRecordStore(); LOADING AND VIEWING: RecordStore rs = RecordStore.openRecordStore("IpDataList",false); int id = rs.getNextRecordID(); byte[] recData = new byte[100];    More>>

When I try to show data saved in a ChoiceGroup, all the data (string) saved are shown as empty field. Why?
Thanks
Paolo


This is the code:


SAVING:


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


int id = rs.getNextRecordID();


String ip = ipString.getString();


byte[] bytes = ip.getBytes();


rs.addRecord(bytes,id,bytes.length);


rs.closeRecordStore();


LOADING AND VIEWING:


RecordStore rs = RecordStore.openRecordStore("IpDataList",false);


int id = rs.getNextRecordID();


byte[] recData = new byte[100];


int dataLen;


for (int i = 1; i < (rs.getNextRecordID()); i++){


dataLen = rs.getRecord(i, recData, 0);


String str = new String(recData, 0, dataLen);


ipChoice.append(str,null);}

   <<Less
About | Sitemap | Contact