Solved

How to read a DBFile database using VB6?

Posted on 2003-11-29
5
980 Views
Last Modified: 2011-10-03
Is it possible to read a database created using Berkley DB-File (a perl Module) in Visual Basic 6?

The DB was created on a linux box running perl, the program produces a database file which was created using the perl module DB-File.  I need to copy this database to a win32 machine and read some of the information from it.

I have no problems reading other databases in VB like Access (.mdb) or SQL, but this is format of DB is new to me!

Thanks!
0
Comment
Question by:Frog357
  • 2
5 Comments
 
LVL 9

Expert Comment

by:TooKoolKris
ID: 9843021
Access won't read it at all if you try open it? Tried to find you an ADO connection string for it on the Net but nothing is out there for VB. Most of what I've seen is in Perl obviously and some in Python.

Good Luck
0
 
LVL 4

Author Comment

by:Frog357
ID: 9843172
Hello,
Yes I tried with Access, I tried renaming it to different file types that access will open, no luck!
0
 
LVL 9

Accepted Solution

by:
TooKoolKris earned 250 total points
ID: 9843449
You might have to end up getting the data out of the db file and into a text and better yet a comma delimited delimited format. You can pretty much import that into another database format from that point. Might actaully be easier then trying to conect via VB, lol.
0
 

Expert Comment

by:joeatxdobs
ID: 11943894
Berkeley default install includes command line utilities that can dump the contents of Berkeley db file to text which you could parse and load into your db.

There are drivers and source code samples for just about every language which uses Berkley DB.  We use Berkley extensively from Java, C and Python because of it's extremely high speed inserts.     See the vendor site: http://www.sleepycat.com/index.php

The second issue you will run into is that Berkeley is really only and ISAM rather than a full DB.  This is good if you need low level control and high speed but bad if you are used to the DB doing a lot of work for you such as managing columns.  The Net result is that after you dump the Berkeley DB file to disk you will have to reverse engineer the line formats so you can parse them out into individual fields and Berkeley DB programmers commonly put many different formats in the same DB file so you will have to detect the differences so you can use a different line parser for each record.  

Many Berkley DB programmers store mostly delimited strings as the ISAM data body but it is entirely possible to use binary formats and if so you will need documentation from the original author on the underlying structure of each binary data structure retrieved.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question