mcooperman has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I want to extract and IMAGE BLOB from a Microsoft SQL 2000 server via a perl script on Solaris.
I have perl 5.6.1, freetds 0.61 and an early version of DBD::Sybase installed and I can run basic queries just fine.
I have used an explicit SET TEXTSIZE to avoid out-of-memory problems.
There is conflicting info in the DBD::Sybase vs freetds docs as to whether this is at all possible.
Right now, I get a segmentation fault in the following code:
my $sqlquery = "SELECT Date_, Graphic_Image from GRAPHIC_VIEW ..."; $dbHandle->{syb_binary_images} = 1; #return image as binary not hex my $sth = $dbHandle->prepare($sqlquery); $sth->{syb_no_bind_blob} = 1; $sth->execute; my $row; my $len; while(1){ # segementation fault in next statement $len = $sth->func(2,$imgchunk,2048,'ct_get_data'); last if $len != 2048; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Retrieve MS SQL Image to per/UNIX
by cbro (Pilgrim) on Jun 06, 2003 at 12:58 UTC | |
by mcooperman (Initiate) on Jun 06, 2003 at 17:51 UTC | |
by cbro (Pilgrim) on Jun 06, 2003 at 18:26 UTC | |
by Anonymous Monk on Jun 08, 2003 at 15:45 UTC | |
|
Re: Retrieve MS SQL Image to per/UNIX
by mpeppler (Vicar) on Jun 06, 2003 at 12:47 UTC |