>
> ***********
> full script...
> **********
> #!d:/perl/bin/perl.exe -w
> print "Content-type: text/html\r\n\r\n";
> use CGI;
> use DBI;
> use DBD::Oracle;
>
> print " test1 ";
> print " test2 ";
>
> %attr = (
> PrintError => 0,
> RaiseError => 1
> );
>
> print " test3 ";
> $dbh = DBI->connect("dbi:Oracle:orat1", "system", "manager", \%attr )
> or die "cant connect: , $dbh->errstr(), \n";
The arrrow -> isnt resolved when in as string.
Try this intead: "cant conenect: " . $dbh->errstr() .\n$@";
usually there is a bat file coming with oracle (orauser) which contains all
settings needed, for using oracle. You should run that in console before you
start the webserver and then start the webserver from the same console.
If you are not sure where your errormessages are going type the follwing at
the start of your
script: open (STDERR, ">errorfile.txt");
Which is ugly, but should do the trick.
Without detaild error information it is hard to guess what is exactly wrong.
> print " test4 ";
>
> $dbh->trace(3, "dbitrace.log");
> $query="SELECT A_ID FROM e_code";
>
> $sth = $dbh->prepare($query);
> $sth->execute;
>
> while (( $A_ID) = $sth->fetchrow() ) {
> print "$A_ID\n";
>
> }
> $sth->finish;
> $dbh->disconnect
> or die "Disconnect failed: $dbh->errstr()";
> exit;
> ****************
> end entire script
> *******************
>