?
Solved

How to read a DBFile database using VB6?

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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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

765 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