Solved

How to read a DBFile database using VB6?

Posted on 2003-11-29
5
985 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

696 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