This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Delete a RecordStore  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ole Kristian
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm...
Doesn't that strike you as a weird implementation of the closeRecordStore() method?
Ole Kristian
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!