Converting DBM to other DB file type

A

Archi3

I have an older program which stores information in a dbm file...is there a
way to convert this file into something Windows based or that can data
transferred into SQL?

I appreciate any help.
(e-mail address removed)
 
J

James Willmore

I have an older program which stores information in a dbm file...is
there a way to convert this file into something Windows based or
that can data transferred into SQL?

I appreciate any help.

As you get each record from the dbm file, you can then insert the
record into your new database using DBI. Or, you can loop through
each dbm record and write it to a CSV file - then, using your database
client, you can insert the records into your database (because _most_
databases will allow you to update/insert/etc. records from a CSV
file).

Since you have given little information about what your doing (code,
database your going to use, what you have tried so far), this is all I
can offer.

HTH

--
Jim

Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.

a fortune quote ...
For perfect happiness, remember two things: (1) Be content with
what you've got. (2) Be sure you've got plenty.
 
G

Gunnar Hjalmarsson

Archi3 said:
I have an older program which stores information in a dbm file...is
there a way to convert this file into something Windows based or
----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^

It's not apparent from the info you provided that there is a need to
convert the format in order to make it work on Windows. Simple DBM
files (SDBM), for instance, work fine on both *nix and Windows platforms.

http://www.perldoc.com/perl5.8.0/pod/perlport.html#Standard-Modules

/ Gunnar
 
A

Archi3

Jim,

I have the account file (account.dbm) from an older program I use...can I
just manipulate that file?
My background..VB6 programmer with little knowledge of PERL, CGI, Linux..etc
etc
I was hoping I could take the files and DTS them into a SQL db or something
to that effect
Is there a program I can open the file in, that is windows based?

Thanks,
Archi3
 
G

Gunnar Hjalmarsson

Please do not top post! http://web.presby.edu/~nnqadmin/nnq/nquote.html
I have the account file (account.dbm) from an older program I
use...can I just manipulate that file?

In your first post you said "dbm file", and now you are talking about
a file whose extension is .dbm, which probably is quite another thing.
My background..VB6 programmer

If you are a programmer - any kind of programmer - you should realize
that you need to provide accurate and detailed information if anybody
shall be able to help you with this kind of problem.

Also, please note that this is a group for discussing the Perl
program. I'm not sure what made you post here in the first place.
 
J

James Willmore

Archi3 said:
I have the account file (account.dbm) from an older program I use...can I
just manipulate that file?
My background..VB6 programmer with little knowledge of PERL, CGI, Linux..etc
etc
I was hoping I could take the files and DTS them into a SQL db or something
to that effect
Is there a program I can open the file in, that is windows based?

How was the DBM file created? Was it created with Perl or some other
software?

If you have the code that produced the DBM file lying around, you
could modify it to write out each record to a CSV file (a comma
separated values file). _Most_, if not all modern RDBMS's have _some_
facility to import information into a database from a CSV file. That
was the basic jist of the previous reply.

Did you want to write a script to do this -or- were you looking for
someplace with something pre-made? If the later, go to
http://freshmeat.net. It's an open source repository. There you may
find something pre-made. If you wanted to write your own, check out
http://www.perl.com. The latest "Perl Cookbook" article applies, in
part, to databases (DBD::SQLLite I believe). This may give you some
ideas. If nothing else, it will show you some Perl syntax and
generate some more questions and/or code.

HTH

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,138
Messages
2,570,803
Members
47,349
Latest member
jojonoy597

Latest Threads

Top