This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Delete a RecordStore Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Delete a RecordStore" Watch "Delete a RecordStore" New topic
Author

Delete a RecordStore

Ole Kristian
Greenhorn

Joined: Jun 19, 2002
Posts: 10
Hi!
This shouldn't really be a problem, but I'm having trouble deleting a RecordStore:

My code:
--------
try
{
RecordStore reiser=
RecordStore.openRecordStore("Reiser",true);

String fileName =reiser.getName();
reiser.closeRecordStore();
RecordStore.deleteRecordStore(fileName);
}
catch(RecordStoreException rse)
{
rse.printStackTrace();
}
--------
This code gives me a RecordStoreException. That's all I'm able to tell from the exception. I know that the fileName variable contains the correct name of the RecordStore.
I appreciate any help from you!
Yours,
Ole Kristian Buseth
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
Is the record store being opened somewhere else in your code without closing it? You have to call the close method as many times as you call the open method before it will truly close. If you want to verify that the record store is being found, you could put a catch block before the catch block you have to catch a RecordStoreNotFoundException. If that catch block does not execute, the you will know that it is finding the record store.


Matthew Phillips
Ole Kristian
Greenhorn

Joined: Jun 19, 2002
Posts: 10
Hmmm...
Doesn't that strike you as a weird implementation of the closeRecordStore() method?
Ole Kristian
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Delete a RecordStore
 
Similar Threads
strange searching
how to use RMS in mobile application
Windows XP and Linux Together
Palm + Database = ??
I can not execute openRecordStore function in RMS