?
Solved

How to read a DBFile database using VB6?

Posted on 2003-11-29
5
Medium Priority
?
993 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
4 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 750 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

749 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