Here's an example script...
use DBI;
use strict;
$dbh = DBI->connect($source,$username,$auth,
{ LongReadLen => 1000000,
LongTruncOk => 0,
RaiseError => 1,
AutoCommit => 1
}
);
$clob_text = $dbh->selectrow_array(q{SELECT CLOB_TEXT FROM TABLE WHERE ID =
7000});
print $clob_text, "\n";
$dbh->disconnect;
exit;
With the above, I retrieve $clob_text which is of length
138000 characters. I guess my value of LongReadLen is a
little excessive!
HTH,
Stacy
Bart Lateur wrote:
>
> On Thu, 27 Jun 2002 14:27:44 -0800, Jake Feasel wrote:
>
> >I am running DBD::Sybase 0.91 against SQL Server 2000 (DBI 1.20). When I
> >select text columns that have more than 4k of data in them, the result is
> >cut off at 4096 (4k) bytes. I have tried different databases on different
> >servers (all MSSQL 2000) and I consistently get this data cut off, always at
> >4096. I have tried issuing this exact same query through ODBC, and I get
> >all of the data out. This seems to indicate to me that this is a DBI
> >problem. I assume there is some setting somewhere that I need to change,
> >but I am at a loss to find it.
>
> Search the DBI docs for "LongReadLen".
>
> HTH,
> Bart.