Save and retrieve data from Berkeley DB Databases : dbm « Database « Ruby






Save and retrieve data from Berkeley DB Databases


require 'bdb'

db = BDB::Hash.create('r2.db', nil, BDB::CREATE)
db['W'] = 'i'
db.close

db = BDB::Hash.open('r2.db', nil, 'r')
db['W']
db.close

 








Related examples in the same category

1.Using Berkeley DB Databases
2.each loop on Berkeley DB Databases
3.Save and retrieve data from DBM