BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 02-23-2007, 12:12 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2007
Location: India
Model: 7100v
Carrier: aittel
Posts: 35
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question Can we delete specific contents of DataBase

Please Login to Remove!

I want to delete some contents of my previously stored data
OR
suppose if I store my vector in data base
synchronized(store)
{
store.setContents(vec1);
store.commit();
}

and after this if i again store a vector suppose
synchronized(store)
{
store.setContents(vec2);
store.commit();
}

then what contents are present in my database ?
1 . Only vec2
2 . Both vec1 and vec2
if both plz tell me the way to delete vec1

Last edited by Rojiwadiya dinesh : 02-23-2007 at 03:36 AM.
Offline  
Old 02-23-2007, 06:33 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

setContents sets the contents of that persistenStore to whatever object you pass it - so in your above scenario the resulting content will be vec2

if you want to wipe data you should use:

PersistentStore.destroyPersistentObject(0x888HASHS TRING588L);
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 02-23-2007, 06:51 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Model: 8800
Carrier: Orange
Posts: 181
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you have a vector that is stored in your persistent store and you want to remove a value then remove the value from the vector and store it again.

For example

Code:
void remove(Object o)
{
    vector.remove(o);
    setStore(vector);
}
Offline  
Old 02-23-2007, 08:29 AM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2007
Location: India
Model: 7100v
Carrier: aittel
Posts: 35
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks !
It is working fine
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

HEWLET PACKARD HIGH VOLTAGE POWER SUPPLY # 710B
$69.9
HEWLET PACKARD HIGH VOLTAGE POWER SUPPLY # 710B pictureTeledyne Induction Motor Voltage Measurement Module MVM 160001 1383V W/ AC Probe
$299.99
Teledyne Induction Motor Voltage Measurement Module MVM 160001 1383V W/ AC Probe picture120W Golf Cart Voltage Reducer Converter Regulator 48Volt 48V To 12V 10A US
$17.99
120W Golf Cart Voltage Reducer Converter Regulator 48Volt 48V To 12V 10A US pictureLDWS-T-500 High Power Spindle Brushless Driver Working voltage 12v-36v
$22.99
LDWS-T-500 High Power Spindle Brushless Driver Working voltage  12v-36v pictureICM CONTROLS THREE PHASE VOLTAGE MONITOR ICM450
$39.99
ICM CONTROLS THREE PHASE VOLTAGE MONITOR ICM450 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.