Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Blob fields query - 4096 bytes?

3 posts in PHP Last posting was on 2009-03-16 17:10:07.0Z
Ron Posted on 2009-03-16 14:22:55.0Z
Date: Mon, 16 Mar 2009 14:22:55 +0000
From: Ron <ron@motionlab.co.uk>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
Newsgroups: Advantage.PHP
Subject: Blob fields query - 4096 bytes?
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 78.105.117.188
Message-ID: <49be60a3@solutions.advantagedatabase.com>
X-Trace: 16 Mar 2009 08:22:27 -0700, 78.105.117.188
Lines: 33
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!78.105.117.188
Xref: solutions.advantagedatabase.com Advantage.PHP:978
Article PK: 1135463

ADS v9 PHP 5 running under IIS 7

I have a table with some blob fields in it that I expect to contain
image data.

I did a lookup on the table trying to extract the data from the field,
but the data I get back seems too short to be a full image binary, and
wont render in any image viewer I have.

I can view the image fine in the Advantage Data Architect.

I suspect my conection method is causing the problem.

Query is:

$rConn = ads_connect($this->dataDictionary,$this->username,$this->password};
$rResult = ads_do( $this->rConn, "SELECT RefPicture FROM PRODUCTLOOKUP
where SupProd = '$productRef' " );
$row = ads_fetch_array( $rResult );
print($row['RefPicture']);

The string that is output is exactly 4096 bytes in length, which
suggests to me that it's probably hitting a buffer limit somewhere in
the connection or server settings.

I've been looking at ads_binmode and ads_longreadlen to try and get
around that but It doesn't seem to have any effect.

Has anyone come across anything like this before?

Thanks in advance

Ron Heywood


Lance Schmidt Posted on 2009-03-16 15:28:01.0Z
From: "Lance Schmidt" <LanceSc@ExtendSys.com>
Newsgroups: Advantage.PHP
References: <49be60a3@solutions.advantagedatabase.com>
Subject: Re: Blob fields query - 4096 bytes?
Date: Mon, 16 Mar 2009 09:28:01 -0600
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 10.24.38.117
Message-ID: <49be6fe4@solutions.advantagedatabase.com>
X-Trace: 16 Mar 2009 09:27:32 -0700, 10.24.38.117
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.38.117
Xref: solutions.advantagedatabase.com Advantage.PHP:979
Article PK: 1135462

Hi Ron,

Ads_longreadlen is the API you need.

Best Regards,

Lance Schmidt
Advantage R&D

"Ron" <ron@motionlab.co.uk> wrote in message
news:49be60a3@solutions.advantagedatabase.com...
> ADS v9 PHP 5 running under IIS 7
>
> I have a table with some blob fields in it that I expect to contain image
> data.
>
> I did a lookup on the table trying to extract the data from the field, but
> the data I get back seems too short to be a full image binary, and wont
> render in any image viewer I have.
>
> I can view the image fine in the Advantage Data Architect.
>
> I suspect my conection method is causing the problem.
>
> Query is:
>
> $rConn =
> ads_connect($this->dataDictionary,$this->username,$this->password};
> $rResult = ads_do( $this->rConn, "SELECT RefPicture FROM PRODUCTLOOKUP
> where SupProd = '$productRef' " );
> $row = ads_fetch_array( $rResult );
> print($row['RefPicture']);
>
> The string that is output is exactly 4096 bytes in length, which suggests
> to me that it's probably hitting a buffer limit somewhere in the
> connection or server settings.
>
> I've been looking at ads_binmode and ads_longreadlen to try and get around
> that but It doesn't seem to have any effect.
>
> Has anyone come across anything like this before?
>
> Thanks in advance
>
> Ron Heywood


Ron Posted on 2009-03-16 17:10:07.0Z
Date: Mon, 16 Mar 2009 17:10:07 +0000
From: Ron <ron@motionlab.co.uk>
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
MIME-Version: 1.0
Newsgroups: Advantage.PHP
Subject: Re: Blob fields query - 4096 bytes?
References: <49be60a3@solutions.advantagedatabase.com> <49be6fe4@solutions.advantagedatabase.com>
In-Reply-To: <49be6fe4@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 78.105.117.188
Message-ID: <49be87d2@solutions.advantagedatabase.com>
X-Trace: 16 Mar 2009 11:09:38 -0700, 78.105.117.188
Lines: 6
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!78.105.117.188
Xref: solutions.advantagedatabase.com Advantage.PHP:980
Article PK: 1135464

Awesome

Thank you kindly

Regards
Ron