Converting DBM to other DB file type

Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default Converting DBM to other DB file type

    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.
    [email]archi3@nospamarchiventure.net[/email]


    Archi3 Guest

  2. Similar Questions and Discussions

    1. Converting from data type varchar to data type money
      Hi all, Tearing my hair out trying to figure this out. If anyone can provide any help i would greatly appreciate it. When I try to do an insert...
    2. Converting data type varchar to data type money
      Hi all, Tearing my hair out trying to figure this out. If anyone can provide any help i would greatly appreciate it. When I try to do an insert...
    3. HowTo Send Uploaded File with INPUT Type file to Sql Server Image Data Type
      I have the following problem: I have the following form client side: <FORM.......> <FORM action="./WZUpload.asp" method="Post"...
    4. HowTo Send Uploaded File with INPUT Type file to Sql Server Image Data Type ?
      I have the following problem: I have the following form client side: <FORM.......> <FORM action="./WZUpload.asp" method="Post"...
    5. Converting image type to ntext
      Hi! I need to convert image type of Column(/field) to nText type. I am able to do this by going n changing through the Design table, ie converting...
  3. #2

    Default Re: Converting DBM to other DB file type

    On Thu, 11 Sep 2003 10:48:00 -0400
    "Archi3" <archi3@archiventure.net> wrote:
    > 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. [url]http://www.gnu.org/licenses/gpl.txt[/url]
    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.
    James Willmore Guest

  4. #3

    Default Re: Converting DBM to other DB file type

    Archi3 wrote:
    > 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.

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

    / Gunnar

    --
    Gunnar Hjalmarsson
    Email: [url]http://www.gunnar.cc/cgi-bin/contact.pl[/url]

    Gunnar Hjalmarsson Guest

  5. #4

    Default Re: Converting DBM to other DB file type

    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
    > > 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. [url]http://www.gnu.org/licenses/gpl.txt[/url]
    > 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.

    Archi3 Guest

  6. #5

    Default Re: Converting DBM to other DB file type

    Please do not top post! [url]http://web.presby.edu/~nnqadmin/nnq/nquote.html[/url]

    Archi3 wrote:
    > James Willmore wrote:
    >> On Thu, 11 Sep 2003 10:48:00 -0400 "Archi3"
    >> <archi3@archiventure.net> wrote:
    >>> 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?
    >>
    >> 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).
    >
    > 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.

    --
    Gunnar Hjalmarsson
    Email: [url]http://www.gunnar.cc/cgi-bin/contact.pl[/url]

    Gunnar Hjalmarsson Guest

  7. #6

    Default Re: Converting DBM to other DB file type

    "Archi3" <archi3@archiventure.net> wrote in message news:<3f61f6ec@news.greennet.net>...
    > 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?
    <snip>
    > >
    > > 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.
    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
    [url]http://freshmeat.net[/url]. It's an open source repository. There you may
    find something pre-made. If you wanted to write your own, check out
    [url]http://www.perl.com[/url]. 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
    James Willmore Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139