Master
'
s Thesis 2006 
FACHHOCHSCHULE
HOCHSCHULE F
U
R
LI Hui 
STUTTGART
TECHNIK
The implementation 
        STUTTGART UNIVERSITY OF APPLIED 
SCIENCES 
several  methods  to  manage  as  well  as  insert,  update,  and  delete  records  in  a  record 
store. 
The below statement will create a RecordStore with the name 
databasename
, if it is 
already not present otherwise this method returns a reference to the same record store 
object. 
RecordStore rs = RecordStore.openRecordStore("databasename",true); 
Listing 12:
 Create or open a RecordStore 
After performing all operations, a call to the given below method closes the 
RecordStore with the given name. 
Rs.closeRecordStore(); 
Listing 13:
 Close a RecordStore 
Below given method will delete the named RecordStore. 
RecordStore.deleteRecordStore("databasename "); 
Listing 14:
 Delete a RecordStore 
3.4.2  Data records operation 
The given below statement will insert an array of bytes in RecordStore and will return 
the recordID of this inserted record after writing it to persistent storage. 
String appt = "new record"; 
byte bytes[] = appt.getBytes(); 
rs.addRecord(bytes,0,bytes.length); 
Listing 15:
 Insert a Record 
44 




PHP MySql Web Hosting Design and Implement Client Applications PHP MySQL Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.