CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
DBD::AnyData under FreeBSD - give advice

 



S_Shrum
User

Sep 26, 2001, 4:59 PM

Post #1 of 2 (1226 views)
DBD::AnyData under FreeBSD - give advice Can't Post

I am attempting to set up DBI with DBD:AnyData. I am running into a issue in that it is not working.

Here is the simple code that I have to test with:

<code>
#!/usr/bin/perl
BEGIN {
unshift(@INC, '/a/home/shrum/cgi-bin/lib');
}

use DBI;

my $dbh = DBI->connect('dbi:AnyData(RaiseError=>1):');
$dbh->func('sites', 'Pipe', 'flying_sites.dat', 'ad_catalog');
my $sth = $dbh->prepare("SELECT State FROM sites");
$sth->execute();
while(my $row = $sth->fetch) {
print "@$row\n";
}
</code>

I am getting the following error in the log file:

<code>
DBD::AnyData initialisation failed: Can't locate object method "driver" via package "DBD::AnyData" at /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/DBI.pm line 481.

Perhaps the capitalisation of DBD 'AnyData' isn't right. at /a/home/shrum/cgi-bin/dbd-installed.pl line 15
[Wed Sep 26 17:34:44 2001] db_table2.pl: Required FILE parameter not specified.
</code>

I created a simple DBI call to see what drivers were installed to make sure that I at least had AnyData listed:

http://www.shrum.net/cgi-bin/dbd-installed.pl

The returned result lists ADO and AnyData.

Any ideas on what I am doing wrong?

Sean Shrum
sean@shrum.net
www.shrum.net


S_Shrum
User

Sep 30, 2001, 1:18 AM

Post #2 of 2 (1218 views)
Re: DBD::AnyData under FreeBSD - give advice [In reply to] Can't Post

Never mind... I got it going. See post in beginner area if you are curious.

Sean Shrum
sean@shrum.net
www.shrum.net

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives