Re: odbc_lob_read chunk is short

Mike Grau <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
Martin Gainty wrote:
> "odbc_lob_read(sth, colno, buf, length, \%attrs)
> where \%attrs can contain TYPE => SQL_type."
> 
> http://www.nntp.perl.org/group/perl.dbi.dev/2010/07/msg6140.html
> 
> where Type should be SQLBINARY
> http://www.nntp.perl.org/group/perl.dbi.dev/2010/09/msg6258.html

Thanks Martin,

I've tried various incantations ...

$s->odbc_lob_read($s, 1, \my $x, 8, {TYPE => 'SQL_BINARY'})
$s->odbc_lob_read($s, 1, \my $x, 8, {TYPE => 'SQL_C_BINARY'})
$s->odbc_lob_read($s, 1, \my $x, 8, {TYPE => 'SQLBINARY'})
odbc_lob_read($s, 1, \my $x, 8, {TYPE => 'SQL_BINARY'})
odbc_lob_read($s, 1, \my $x, 8, {TYPE => 'SQL_C_BINARY'})
odbc_lob_read($s, 1, \my $x, 8, {TYPE => 'SQLBINARY'})

... and the result is the same - 7 bytes are in the buffer, while the
amount yet to be read is reduced by 8.

> "It turns out I was mistaken as DBD::Oracle DOES implement blob read
> although I've not tested it works. Someone, in the distant past
> attempted an implementation in DBD::ODBC but it does NOT work and is
> seriously flawed."
> http://www.nntp.perl.org/group/perl.dbi.dev/2010/07/msg6144.html

Sorry for being thick - are you saying reading the BLOB in chunks just
isn't going to work?

-- Mike
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.