Hi Guy's
Can anyone tell me what I'm doing wrong. I'm trying to get a blob out of the SQL DB and Display the image. It will only give me 4096 max. I've tried many, many different things and nothing will extract the whole thing. I thought it was a limitation on ADO and found the mssql_connection has the same problem. I've also downloaded the newest service pack for SQL 7.0(someone told me it was a limitation with SQL 7.0 and the SP4 fixed the problem) didn't work. I know the whole image is there because I wrote a VB Program which writes the image to a file and then I can see it.
If anyone can tell me what I'm doing wrong I would appreciate. Here is the last bit of code I tried. I'm only getting a portion of the image. I'm using ADO connection and recordsets but I have the same results when I us mssql_connect.
<?
header("Content-type: image/jpg");
include_once("config.inc");
include_once("conn.inc");
$cn->readonly = true;
//$cn->binmode = ODBC_BINMODE_PASSTHRU;
$cn->maxblobsize = 0; //zero to pass through
$sku="coke";
//$sku = $HTTP_GET_VARS['sku_cd'];
$sku="'".$sku."'";
$cmd5="SELECT img_image FROM mylximage WHERE img_key = $sku AND img_type = 'sku'";
$rs5 = $cn->Execute($cmd5);
if (!$rs5){error_dis(21,"die","getimage.php");}
While (!$rs5->EOF){
$sku_image=$rs5->fields("img_image");
//$sku_image->max_length = '8192';
//$sku_image = $rs5->MetaType($sku_image->type,$sku_image->max_length,$sku_image);
//$sku_image=rawurldecode($sku_image);
$rs5->MoveNext();
}
print($sku_image);
// release resources
// clean up release resources...
flush();
$cmd5='';
$rs5->close();
$cn->close();
?>
Shelley