I must be doing something wrong... (reading image data with DBD::Sybase)

"Rob Verschoor" <[email protected]> Fri, 1 Jun 2007 10:41:05 +0200
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Organization Sypron B.V.
Message-ID <190b01c7a428$b60ef870$6601a8c0@ZEUS>
Folks, I've looked everywhere but I cannot find the error I'm no doubt 
making.
In short, I'm unable to read more than 32768 bytes from an image column, 
although I've followed -afaik- all the required steps.

I've verified that the image stored in the image column is indeed bigger 
than 32Kb (with datalength()). However, I'm getting only the first 32KB 
returned.

My code:

$dbh->{LongReadLen} = 10000000;

$sth = $dbh->prepare("select img_col from my_table where id = 12345 ");
$sth->{syb_no_bind_blob} = 1;
$sth->execute;

while(my $d = $sth->fetch) {
    $size = $sth->syb_ct_get_data(1, \$my_img, 0);
}


...which returns only 32KB.

However, when I select @@textsize prior to the prepare(), this returns 
32768. In fact, I replaced setting LongReadLen with 'set textsize 
10000000', and this does not change things: select @@textsize then still 
returns only the first 32KB. I've verified through the MDA table 
monSysSQLText that 'set textsize 10000000' is actually executed, so it 
beats why @@textsize is still set to 32768.

Any hints appreciated!

Thanks,

Rob V.
[email protected]