Several years ago I wrote a script that used DB_File to manipulate a small database. The only reason I really did this was to simplify things rather than using a flat file. It has however come back to bite me. The server the script was hosted on got upgraded and now when trying to tie the database I get the error "File Exists". Here's how I'm trying to tie it:
tie (%DATABASE, "DB_File", "$OPTIONS{database_dir}/database.db", O_RDW
+R|O_CREAT, 0755, $DB_BTREE) || die "Cannot open database: $!\n";
Can anyone tell me why this is happening? I've got a lot of data in these databases that unfortunately is not backed up in an alternate form and would like to recover it. Any suggestions would be appreciated.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.