I am not sure if this is a mason issue, a DBI issue or a mason+DBI+solaris
issue.

However, my issue is that using DBI::CSV and DBI::MDLM. If I use CSV first,
the MDLM call complains that the CSV file is not readable. If I use MDLM
first, the CSV call complains that the MDLM file is not readable.

I have things in enclosures to make sure that the everything is scoped.

Error message for MLDBM accidently using the CSV connection:
[Wed Apr 11 20:40:06 2007] null: DBD::CSV::st fetchrow_array failed: Attempt
to fetch row from a Non-SELECT statement [for Statement "SELECT count(*)
FROM table WHERE identifier = ? "] at
/usr/local/apache/lib/perlMldbm.pm<http://mldbm.pm/>line 99.

Or this if the connections are swapped around.
[Wed Apr 11 19:56:53 2007] null: Execution ERROR:  Cannot open
/usr/local/apache/data/schools.lck: No such file or directory at
/usr/local/lib/perl5/5.8.5/CGI/Carp.pm line 314.


This is apache-1, perl 5.8.5 on solaris. DBI 1.46. MLDBM: 2.01. DBD::CSV -
0.22

       my $match = {};
       {
               package SearchCSV;

               # try grabbing a line and finding the chars.
               my $id_dbh;
               unless($id_dbh =
DBI->connect(qq{DBI:CSV:csv_sep_char=,;csv_eol=\n}))
               {
                       warn("try_text_file. Failed to connect to \"$DATA\".
$!
");
                       return(RETURN_FAIL);
               }

               $id_dbh->{'csv_tables'}->{'list'} = {'file' => $TEXT_FILE};

               my $id_sql = qq|SELECT * FROM school_list WHERE id = ?|;
               my $id_sth = $id_dbh->prepare($id_sql);
               my $ex_rc = $id_sth->execute($email);
               unless($ex_rc)
               {
                       print STDERR "FAILURE: $ex_rc\n";
                       return(RETURN_FAIL);
               }

               # There is only one result - unique ID.
               $match = $id_sth->fetchrow_hashref();
               $id_dbh->disconnect;
               undef $id_dbh->{'csv_tables'};
       }

       # See if the visitor has already registered using the output
database file.
       {
               package Exists;
               use Mldbm;
               my $csv = Westfield::SFYS::Mldbm->new();
               my ($csv_rc, $exists) = $csv->exists($email);
               if ($exists)
               {
                       return(1, $error_message);
               }
       }






Thanks
John
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to