Ok, now I've already installed DBI-1_20 on my system, and when try to
install DBD::ODBC I get:

-Version 0.28 of 'DBD::ODBC' is already installed
-Remove it or use 'Verify --upgrade DBD::ODBC'.

Then I try to lounch the demo:

#!C:\Programmi\ActivePerl\bin\perl.exe

use DBI;
use CGI_Lite;

$|=1;

# ora dobbiamo cambiare il meccanismo
# per leggere l'input dell'utente
# l'input viene passato dal server http

$cgi=new CGI::Lite;
%form=$cgi->parse_form_data;
$id=$form{id};
$dbh = DBI->connect ('dbi:ODBC:pubblicazioni');
$sql = "SELECT * FROM Articoli WHERE
                     ( Articoli.ArtID = $id )";
$sth=$dbh->prepare($sql);
$sth->execute;

# e dobbiamo anche cambiare la fase di output
# perche' ora il programma deve generare
# un valido documento HTML

print "Content-type: text/html\n\n";
print "Il record numero $id
contiene i seguenti dati:<BR>\n";
foreach $field ( $sth->fetchrow() ) {
   print "$field<BR>\n";
}

and I get:

Can't locate loadable object for module DBI in @INC <@INC contains:
C:/Perl/lib.> at C:/Perl/lib/DBI.pm line 190
BEGIN failed--compilation aborted at C:/Perl/lib/DBI.pm  line 190.
BEGIN failed in require at demo.cgi line 3.
BEGIN failed--compilation aborted at demo.cgi line 3.

Ok, now I attach to this E-mail the source code of my 'DBI.pm'.

That's all.
I hope you have an answer for me.
Thanks.

>>Dego.


Reply via email to