Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Sakberry
Posts: 248
Registered: ‎11-23-2009
My Device: Not Specified

How to delete all records in a recordstore?

Hi All

 

is there a way i can delete all the records in my recordstore? something like a reset?

 

i tried RecordStore.DeleteRecord("MyRecordStore");

 

But when i create a new recordstore with the same name, the records are still there!!

 

i want to create a new blank recordstore with the same name but with all fields having null value. Can someone please help  me here?

 

Thanks,

Saket

 

Developer
nitinverma274
Posts: 950
Registered: ‎06-22-2010
My Device: 9550

Re: How to delete all records in a recordstore?

[ Edited ]

 

RecordStore.deleteRecordStore(recordStoreName);

 

Sorry I missread the Thread.

It is used for delete RecordStore.

Thanks

Nitin

------------------------------------------------------------------------------------
Press Kudo to say thank to developer.
Also Press the Accept as solution Button when u got the Solution.

Developer
Sakberry
Posts: 248
Registered: ‎11-23-2009
My Device: Not Specified

Re: How to delete all records in a recordstore?

RecordStore.DeleteRecord(RecordStoreName) should delete a recordstore right?

 

but why does it so happen that when i create a new recordstore with the same name after performing the above operation i can view the records in the recordstore???

 

Thanks,

Saket

Developer
nitinverma274
Posts: 950
Registered: ‎06-22-2010
My Device: 9550

Re: How to delete all records in a recordstore?

RecordStore.deleteRecordStore(RecordStoreName): will delete the RecordStore.

And you can create a newone with Same Name.

I think U should not have not that type of Problem.

try it.

And Let me Look at my Side.

B'coz in my previous Project, I used this, I was not getting any Problem.

------------------------------------------------------------------------------------
Press Kudo to say thank to developer.
Also Press the Accept as solution Button when u got the Solution.

Developer
meera_developer
Posts: 30
Registered: ‎02-02-2012
My Device: 9780

Re: How to delete all records in a recordstore?

Hi,

 

  I am also facing same problem. My application is working on OS 4.5 to 7. All other devices except 7 OS is deleting the recordstore. I dont know why it is  not deleting from teh reocrd store. please help me.

 

Thans 

  meera