ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-DBI
perl-DBI
RE: CLOB datatype
by Lily Fu other posts by this author
Oct 20 2000 12:08AM messages near this date
RE: CLOB datatype | Perl DBD::Oracle ... libwtc8.so
Steve,

Thank you so much for your kind reply!
Now I successfully inserted into CLOB.

However, when I retrieve data from the CLOB
field, it gave me the following error message:

Can you give me an example on retrieve from CLOB?

================================
    ->  prepare for DBD::Oracle::db
(DBI::db=HASH(0x819cd4c)~0x819ce60 'SET LONG 4000

select invoice from invoice_1bookstreet where id = 16
')
    <- prepare= DBI::st=HASH(0x819ceb4) at getInvoice.pl line 71.
    ->  execute for DBD::Oracle::st (DBI::st=HASH(0x819ceb4)~0x819a330)
    dbd_st_execute (STMT TYPE 0) (out0, lob0)...
    !! ERROR: 922 'ORA-00922: missing or invalid option (DBD ERROR:
OCIStmtExecute)'
    <- execute= undef at getInvoice.pl line 75.
    ->  DESTROY for DBD::Oracle::st (DBI::st=HASH(0x819a330)~INNER)
    <- DESTROY= undef at unknown location!
    -- DBI::END
    ->  disconnect_all for DBD::Oracle::dr
(DBI::dr=HASH(0x813c104)~0x819cdd0)
    <- disconnect_all= '' at DBI.pm line 450.
    ->  DESTROY for DBD::Oracle::db (DBI::db=HASH(0x819ce60)~INNER)
    <- DESTROY= undef during global destruction.
    ->  DESTROY in DBD::_::common for DBD::Oracle::dr
(DBI::dr=HASH(0x819cdd0)~INNER)
    <- DESTROY= undef during global destruction.


Lily Fu
(301) 527-1195	lily@[...].com

On Thu, 19 Oct 2000, Steve Sapovits wrote:

>  
>  If you're inserting via DBI, you''ll need to bind the column
>  as a CLOB type.  Here's an chunk of Oracle code I used to 
>  insert email text into a CLOB column:
>  
>  use DBD::Oracle qw(:ora_types);
>  
>  {
>      my $sth;
>  
>      sub add_text()
>      {
>          my $sql = <<"END_SQL";
>            INSERT into email_text (message_id, text)
>            VALUES (?, ?)
>  END_SQL
>  
>          $sth = $dbh->prepare($sql) if (!defined($sth));
>          $sth->bind_param(1, $msg_id);
>          $sth->bind_param(2, $msg_text, {ora_type => ORA_CLOB});
>          save_db_exception() if (!$sth->execute());
>  
>          $sth->finish();
>      }
>  }
>  
>  > -----Original Message-----
>  > From: Lily Fu [mailto:lily@[...].com]
>  > Sent: Thursday, October 19, 2000 9:57 PM
>  > To: dbi-users@[...].com
>  > Subject: CLOB datatype
>  > 
>  > 
>  > 
>  > Sorry if this is not THAT related to DBI...
>  > 
>  > I wonder if anyone has an quick answer to
>  > my question:
>  > 
>  > I set a colum with CLOB datatype,
>  > when I tried to insert some text into it,
>  > it says 
>  > 
>  > "Input truncated to 2499 characters
>  > SP2-0027: Input is too long (> 2499 characters) - line ignored"
>  > 
>  > I read CLOB can hold 2GB data,
>  > how can I make my CLOB field hold large enough data?
>  > 
>  > Thanks a lot!
>  > 
>  > I searched around, but couldn't find an answer to it.
>  > 
>  > Lily Fu
>  > (301) 527-1195	lily@[...].com
>  > 
>  > 
>  > 
>  > 
>  > --------------------------------------------------------------
>  > ----------------
>  > DBI HOME PAGE AND ARCHIVES: 
>  > http://www.symbolstone.org/technology/perl/DBI/
>  > To unsubscribe from this list, please visit: 
>  > http://www.isc.org/dbi-lists.html
>  > If you are without web access, or if you are having trouble 
>  > with the web page, 
>  > please send mail to dbi-users-request@[...].org with the 
>  > subject line of:
>  > 'unsubscribe'.
>  > --------------------------------------------------------------
>  > ---------------- 
>  > 
>  



------------------------------------------------------------------------------
DBI HOME PAGE AND ARCHIVES: http://www.symbolstone.org/technology/perl/DBI/
To unsubscribe from this list, please visit: http://www.isc.org/dbi-lists.html
If you are without web access, or if you are having trouble with the web page, 
please send mail to dbi-users-request@[...].org with the subject line of:
'unsubscribe'.
------------------------------------------------------------------------------ 
Thread:
Steve Sapovits
Lily Fu

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved