RE: CLOB datatype
by Steve Sapovits other posts by this author
Oct 19 2000 11:11PM messages near this date
RE: Ask again: Question about DBD::mysql
|
RE: CLOB datatype
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
|