|
||||
sybperl-l ArchiveUp Prev Next
From: "Patrick S dot Leung" <pleung at easygroup dot com> Hi guys,
I stored gif images in the server using the ct_send_data. Until now all
I do is read. I am extracting them to files. However, my perl script
cannot output anything bigger than 32768 bytes. Here is my script:
$dbh->ct_execute("select datalength(img_rest_1), img_rest_1 from
rest_ima
ge where id_rest = $rest_id");
my $restype=0;
while($dbh->ct_results($restype,0)==CS_SUCCEED){
next unless $dbh->ct_fetchable($restype);
print "datalength: $dat[0]\n";
my @row;
while (@row=$dbh->ct_fetch) {
($ret, $d)=$dbh->ct_get_data(2);
}
}
$gif_filename = $dest_dir . "/" . $rest_id . "-1.gif";
open(SOURCE, ">$gif_filename") or die "Couldn't open file
$gif_filename for writing for writing $!\n";
print "\nwriting $gif_filename...\n";
print SOURCE $d;
I don't know why that the the image is bigger than 32768, all I get is a
file of 32768 bytes and it is corrupted, i.e., not properly closed.
I don't know if $d can't more than 32768 bytes, as I am not aware of
size limitation in perl variables.
thanks,
Patrick
|