Hi folks,
this is the first time I've used DBD::XBase and I'm having a problem with it
not being able to find the tables I wish to view/update.
Below is the perl script, the table I wish to view, and the output from the
program.
I've tried appending the '.dbf', and using both absolute and relative file
paths, along with letting it default the the cwd, all of which made no
difference.
[EMAIL PROTECTED] data]$ cat ~/t1
#!/usr/bin/perl -w
use DBI;
select(STDERR); $|=1;
select(STDOUT); $|=1;
my $dbh=DBI->connect("DBI:XBase:/home/gary/data") || die "cannot connect:
$DBI::errstr";
my $sth=$dbh->prepare('select * from vins;') || die "cannot select:
$DBI::errstr;";
$sth->execute || die "cannot execute: $DBI::errstr";
while (my $rf=$sth->fetchrow_hashref) {
foreach (keys %$rf) {
print "$_=$rf->{$_}\n";
}
}
$sth->finish;
$dbh->disconnect;
[EMAIL PROTECTED] data]$ ls -l /home/gary/data/vins.dbf
-rw-rw---- 1 gary gary 285 Oct 13 16:55
/home/gary/data/vins.dbf
[EMAIL PROTECTED] data]$ ~/t1
DBD::XBase::st execute failed: Table vins; not found: Error opening file
/home/gary/data/vins;: No such file or directory
cannot execute: Table vins; not found: Error opening file
/home/gary/data/vins;: No such file or directory
[EMAIL PROTECTED] data]$
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000