How to open local bitcoin database

Viewed 3542

I am trying to extract data from local bitcoin database. As I know, bitcoin-qt is using BerkeleyDB. I have installed berkley db from Oracle web site, and found here dll for .NET: libdb_dotnet60.dll. I am trying to open any file, but I get DatabaseException. Here is my code:

using BerkeleyDB;
class Program
{
    static void Main(string[] args)
    {
        var btreeConfig = new BTreeDatabaseConfig();
        var btreeDb = BTreeDatabase.Open(@"c:\Users\<user>\AppData\Roaming\Bitcoin\blocks\blk00000.dat", btreeConfig);
    }
}

Does anyone has examples how to work with bitcoin database (on any other language)?

3 Answers
Related