Omnibase Question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Omnibase Question

Bruno Brasesco
Hi all,

I want to remove an Object from the Data Base.
I used #removeKey: method from ODBBTreeDictionary, but this do not remove
the
object only removes the key.

What method should i used to remove an Object ?

Ej:
transaction := db newTransaction.
dict := transaction root at:'Banks'.
bank :=dict at:'ABN'.
"Now I want to remove bank object from my data base "
What should I do ?

Best Regards
Bruno Brasesco


Reply | Threaded
Open this post in threaded view
|

RE: Omnibase Question

Bruno Brasesco
I answer to my self.

db := OmniBase openOn:'c:\temp\OmniBase'.
transaction := db newTransaction.
"the bank is already in the OmniBase"
aODBBTreeDictionary := transaction root at:'Banks'.
aBank := aODBBTreeDictionary at:'ABN'.
aODBBTreeDictionary removeKey: aBank hash ifLocked:[MessageBox
notify:'Block'].
transaction markDirty: aODBBTreeDictionary.
transaction commit.
db close.

Best Regards
Bruno Brasesco