Solved

How to read a DBFile database using VB6?

Posted on 2003-11-29
5
978 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now