I'm very sorry!! I red the Perl DBI book and I have performed the suggests I've recieved two days ago, but nothing!!
I'm trying a lot of proposed solutions but I'm not able to print on Netscape the DBI error of my perl script; ok from prompt, ok from PerlBuilder software, but nothing appears in the Netscape screen!

Here you are an essential extraction of my code, in wich I try to insert a duplicated primary key into an access table: the execute statement have to fail and have to output the message on Netscape screen:

use CGI::Carp 'fatalsToBrowser';
use CGI;
use CGI qw(:standard);
use DBI;
.......................................................
.......................................................
.......................................................
$dbh = DBI->connect('dbi:ODBC:TRYLV','','', {RaiseError => 1 ,PrintError=>1, AutoCommit=> 0}) or die $DBI::errstr;
.......................................................
.......................................................

eval {
 #TESOR INFORMIX, ACCESS
 $cursor_sql->execute;
 # or die ",$cursor_sql->errstr(),"\n";
};

if ($@){
 $dbh->rollback;
 $dbh->disconnect;
 print "error";
 }

Thanks in advance
Regards
 

--
Belvest S.p.A.
Direzione Sistemi Informativi
Ing. Bruno Stefanutti
 

Reply via email to