See attached code:

Any pointers to DBI examples for oracle to do this?
No example clob storage/retreival in perl/dbi book.

clob column stores/retrieves ok using sqlplus.  

Attached DBI script connects & dies on "execute" 
statement if column is clob.  Works
when clob field is not addressed.
------------------------------------------------
 #!d:/perl/bin/perl.exe -w
  print "Content-type: text/html\r\n\r\n";
 use CGI qw/:standard/;
 use DBI;
 open (STDERR, "error_file.txt");
 $g_id = param('g_id');

 $n_edit = "n_edit.pl";
 $ff = "<font color=#8B0000><b>";
 %attr =
  PrintError => 0,
  RaiseError => 1
 );
 my $dbh =
 DBI->connect('DBI:Oracle:ORACLEX.X','log','pas',\%attr) or die
 "Couldn't connect to database: " . DBI->errstr;

 $query = "select n from X"; # <-- n = clob field...
                                   in table X
 $sth1 = $dbh->prepare($query);
 $sth1->execute;  # <-- code stops processing here...
 $ko_id = 0;
 while ( ($note) = $sth1->fetchrow() )

 print "<TR><td><a href=$editlink target=$editlink>   
 Edit </a></td><td>$ff
 $title</font></b></td><td>$note</td></TR>";
 
 print "</table>",hr;
 print "<table border = 0>";
 print "<TR><td><a href=$editlink target=$editlink>  
 Edit </a></td><td>$ff
 $title</font></b></td><td>$note</td></TR>";
 
 print "</table>";
 $sth->finish;
 $dbh->disconnect
      or die "Disconnect failed: $dbh->errstr()";
 print "</body>";
 exit;
--------------------------------------------------------


Reply via email to