My appolgies folks.. Don't know what is going on... This message was sent on the 12th... And it appears again on the 30th...No clue what happened.
-----Original Message----- From: Brittingham, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 12:21 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: SPUG: insert Clob problems I get the following error when I try to insert a CLOB using DBI: Not a CODE reference at extract_ccml__to_oracle_db_testing.pl line 381, <FILE_NAMES> line 1. What am I doing wrong? 380 $sth = $dbh->prepare(qq{INSERT INTO t_opr_instr ( TITLE,DSCR,ORDER_SEQ,PRD_MODEL_SPEC_ITEM_ID ) VALUES (?, ?, ?, ?) }); 381 $sth->( 1, $subproc_heading[$n]); 382 $sth->( 2, $dscr, SQL_LONGVARCHAR); 383 $sth->( 3, $ord_seq); 384 $sth->( 4, $prd_model_spec_item_id); 385 $sth->execute ; -----Original Message----- From: Ruchi Varma [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 11:08 AM To: [EMAIL PROTECTED] Subject: dynamic loading... hello, I had previously sent a message, regarding dynamic loading, on this newsgroup since i had problems installing DBD on my Solaris Box. I hence used the perl executable, created by the DBI installation in the dir /remote/tools/ruchi/perl5/site_perl/5.005/DBI-1.20/, to install DBD and it worked. But now when i run my cgi script using the DBI and DBD i have installed, it gives me the same error concerning Dynamic Loading. I have attached my script to this message ..Please look at it and give me some comments on how to solve this problem. ---------------------------------------------------------------------------- ---------------------------- #!/remote/tools/ruchi/perl5/site_perl/5.005/DBI-1.20/perl -- -*-perl-*- # I also tried using /usr/local/bin/perl5.6 ..but no luck... use lib qw(/remote/tools/ruchi/perl5 /remote/tools/mysql /remote/tools/ruchi/perl5/site_perl); use DBI; use CGI; use CGI::Carp qw(fatalsToBrowser); $driver = "mysql"; $dsn = "DBI:$driver:database = ASSETLOCATOR"; $dbUserName = "root"; $dbPassword = "blah"; $dataIn = new CGI; $dataIn->header(); $requestType = $dataIn->param('requestType'); $sql = $dataIn->param('sql'); if ($sql eq "") { &printSearchForm(); exit; } else { $dbh = &connectToDB(); $dataObject = executeSQLStatement($sql); @dbRows = &getDBRows($dataObject); if ($sql =~ /^SELECT/i) { print qq! <HTML> <HEAD> <TITLE>SQL Statement results</TITLE> </HEAD> <BODY BGCOLOR = "FFFFFF" TEXT = "000000"> <CENTER> <TABLE BORDER = "1">!; foreach $rowReference (@dbRows) { foreach $columnReference (@$rowReference) { print qq!<TR>!; foreach $column (@$columnReference) { print qq!<TD>$column</TD>\n!; } print qq!</TR>!; } } print qq! </TABLE> </CENTER> </BODY> </HTML>!; exit; } else { print "Your SQL Query has been processed, please hit the back button and submit a SELECT to see the changes!"; } } sub connectToDB { return (DBI->connect($dsn, $dbUserName, $dbPassword)); } sub executeSQLStatement { my ($sql) = shift; $dataObject = $dbh->prepare($sql); $dataObject->execute(); return $dataObject; } sub getDBRows { my ($dataObject) = shift; return $dataObject->fetchall_arrayref(); } sub printSearchForm { print qq! <HTML> <HEAD> <TITLE>Enter SQL</TITLE> </HEAD> <BODY BGCOLOR = "FFFFFF" TEXT = "000000"> <FORM METHOD = "POST" ACTION = "query.cgi"> <TABLE BORDER = "1"> <TR> <TH>Enter SQL Query</TH> <TD><INPUT TYPE = "TEXT" SIZE = "40" NAME = "sql"></TD> <TD><INPUT TYPE = "SUBMIT" NAME = "requestType" VALUE = "Submit SQL"></T D> </TR> </TABLE> </FORM> </BGODY> </HTML>!; } ---------------------------------------------------------------------------- --------------------- the dir /remote/tools/mysql has mysql installed the dir /remote/tools/ruchi/perl5/site_perl/5.005 has both DBD and DBI installed The error i get is Can't load module DBI, dynamic loading not available in this perl. (You may need to build a new perl executable which either supports dynamic loading or has the DBI module statically linked into it.) at /remote/tools/ruchi/perl5/site_perl/DBI.pm line 189 BEGIN failed--compilation aborted at /remote/tools/ruchi/perl5/site_perl/DBI.pm line 189. Compilation failed in require at query.cgi line 6. BEGIN failed--compilation aborted at query.cgi line 6. Since the problem appears due to the perl version i am using, which perl version should i use? As far as i know perl versions from 5.004 onwards support dynamic loading. But i am using version 5.6...and it still does not seem to work..:( kindly help.. thanks Ruchi
