Ask a Question related to PERL Miscellaneous, Design and Development.
-
Ken Chesak #1
Oracle CLOB using DBI
Does someone have a working code sample of Perl/DBI returning a CLOB
column from Oracle. Here is what I came up with, I counld not get
ORA_CLOB to work.
$sth1 = $dbh->prepare(q{
BEGIN OPEN :cursor FOR
SELECT dbms_lob.substr( comments, 30000, 1)
FROM comments WHERE id_comment = 46;
END;
});
$sth1->bind_param_inout(":cursor", \$sth2, 30000, { ora_type
=> ORA_RS
ET } );
$sth1->execute();
while ( @row = $sth2->fetchrow ) {
print "row = @row\n";
}
Thanks
Ken Chesak Guest
-
#39103 [Opn]: Oracle CLOB Charset Incorrect
ID: 39103 User updated by: jhtpeter at gmail dot com Reported By: jhtpeter at gmail dot com Status: Open Bug Type: ... -
Updating Oracle Clob field
I am having some trouble updating an oracle db that has a clob field, this is the part of the query that is getting the form data: <cfqueryparam... -
Oracle CLOB Columns Failing With ColdFusion 7
I am using ColdFusion 7 Enterprise, updater 1 with DataDirect version 3.4 drivers and Oracle 8i. ColdFusion 7 is returning no data for CLOB... -
Oracle CLOB Truncation > 64K
We have an update and insert query for a large text field (Oracle CLOB). When we run the query on long text, it truncates the excess. ... -
Oracle CLOB Update in CF
We have a form with two textareas. The action page updates two Oracle clob fields with the content from the textareas. If at least one of the... -
Ron Reidy #2
Re: Oracle CLOB using DBI
What error (if any) are you getting? Did you 'perldoc DBD::Oracle' and
look at the section entitled 'Handling LOBS'? Did you set
LongReadLen/LongTruncOK on the $dbh?
--
Ron Reidy
Oracle DBA
Ken Chesak wrote:> Does someone have a working code sample of Perl/DBI returning a CLOB
> column from Oracle. Here is what I came up with, I counld not get
> ORA_CLOB to work.
>
> $sth1 = $dbh->prepare(q{
> BEGIN OPEN :cursor FOR
> SELECT dbms_lob.substr( comments, 30000, 1)
> FROM comments WHERE id_comment = 46;
> END;
> });
>
> $sth1->bind_param_inout(":cursor", \$sth2, 30000, { ora_type
> => ORA_RS
> ET } );
> $sth1->execute();
>
> while ( @row = $sth2->fetchrow ) {
> print "row = @row\n";
> }
>
> Thanks
--
Ron Reidy
Oracle DBA
Ron Reidy Guest
-
Markus Stueker #3
Re: Oracle CLOB using DBI
On 24 Jun 2003 13:55:40 -0700, [email]datavector@hotmail.com[/email] (Ken Chesak)
wrote:
>Does someone have a working code sample of Perl/DBI returning a CLOB
>column from Oracle. Here is what I came up with, I counld not get
>ORA_CLOB to work.
>
>$sth1 = $dbh->prepare(q{
> BEGIN OPEN :cursor FOR
> SELECT dbms_lob.substr( comments, 30000, 1)
> FROM comments WHERE id_comment = 46;
> END;
> });
>
> $sth1->bind_param_inout(":cursor", \$sth2, 30000, { ora_type
>=> ORA_RS
>ET } );
> $sth1->execute();
>
> while ( @row = $sth2->fetchrow ) {
> print "row = @row\n";
> }
>
>ThanksMarkus Stueker Guest
-
Ron Reidy #4
Re: Oracle CLOB using DBI
From metalink Note 19792.1:
Error: ORA 3115
Text: unsupported network datatype or representation
-------------------------------------------------------------------------------
Cause: A user bind or define, or an Oracle function, is not supported by
this
heterogeneous SQL*Net connection.
Action: Upgrade the older version of Oracle and try again.
Do you have an old Oracle install on the machine the code is running on?
If so, this is your problem.
--
Ron Reidy
Oracle DBA
Ken Chesak wrote:> Would you email my hotmail account again, I delete by mistake since
> 99% is junk mail.
>
> I get the following error,
>
> DBD::Oracle::db prepare failed: ORA-03115: unsupported network
> datatype or repre
> sentation (DBD: odescr failed) at clob.pl line 26.
>
> It runs if I use dbms_lob.substr( comments, 30000, 1).
>
> $dbh->{LongReadLen} = 512 * 1024 ;
> $dbh->{LongTruncOk} = 1;
>
> $sth1 = $dbh->prepare(q{
> SELECT cd_type, comments
> FROM comments WHERE id_comment = 53
> });
>
> $sth1->execute();
>
> while ( ($name, $data) = $sth1->fetchrow_array ) {
>
> print "row = $name $data \n";
>
> }
--
Ron Reidy
Oracle DBA
Ron Reidy Guest



Reply With Quote

