Click here to get back home

DBD::DBM and Berkeley Problem

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
DBD::DBM and Berkeley Problem Christian Maier 10-03-2007
Posted by Christian Maier on October 3, 2007, 2:23 am
Please log in for more thread options
Hello

Can anyone tell me whats the problem with the following code. I get an
error about 2nd tie fails?
Thank You
Chris

<code>
#!/usr/bin/perl

use DBI;

my $dbh = DBI->connect('dbi:DBM:type=BerkeleyDB;mldbm=Storable;ext=');
my $dir = "./"; #/media/sda1/home/cikic/.qtstalker/data1/data/Stocks/
Yahoo/US/";
use BerkeleyDB;

my $env = new BerkeleyDB::Env -Home => $dir; # and/or other Env flags

$dbh-> = {
'DB_CREATE' => DB_CREATE # pass in constants
, 'DB_RDONLY' => DB_RDONLY # pass in constants
, '-Cachesize' => 1000 # set a ::Hash flag
, '-Env' => $env # pass in an environment
};

print $dbh-> . "\n";

my $stmt = $dbh->prepare("SELECT * FROM nasdaq");
$stmt->execute();
</code>

Output is:
DBI::SQL::Nano
MLDBM error: Second level tie failed, "" at /usr/local/lib/perl/5.8.8/
DBD/DBM.pm line 390
cikic@MrZylinder:~/sources/berkeley-sql$ cat bdb_connect.pl


Similar ThreadsPosted
Getting started with Berkeley DB XML November 30, 2006, 11:10 pm
make test failing on Berkeley DB 4.5/perl 5.8 (and 5.6) on BSD6/AMD64 November 29, 2006, 4:44 pm
env Config option and LockDetect option not working with Berkeley DB RPC June 16, 2006, 10:04 am
Problem with Net::FTP July 21, 2004, 12:40 pm
DBI - DBD-DB2 Problem - Please help June 2, 2005, 11:07 pm
Net::FTP->problem with put February 28, 2006, 2:11 am
Re: Problem with DBD::DB2 on AIX. September 20, 2006, 2:10 pm
net::telnet problem July 23, 2004, 6:46 pm
Lwp Post Problem September 1, 2004, 4:09 am
DBD-Pg installation problem September 20, 2004, 10:34 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap