Board index » delphi » Sybase Adaptive Server Anywhere ODBC driver BLOBsize setting problem

Sybase Adaptive Server Anywhere ODBC driver BLOBsize setting problem

Hi
I'm currently using Delphi 5.0 against Sybase Adaptive Server 11.9.2,
the BDE alias is direct SQL link,I store some JPG images in a image
 field, the jpg file size is between 20k and 400k,and everything
 is OK.
but if I change the database to a ASA( Adaptive Server Anywhere 6)
and ODBC driver, I found I can not store a image large than 32k,
even I set the BLOB SIZE of the BDE Alias to 1000.
the apperence is : I can save a image file to database and commit
the transaction, there are no any exception ,the code is like this:
         ...
         DBS.QM.Edit
         ....
         DBS.QMIIMAGE.LoadFromFile(OpenPDialog1.FileName);
         DBS.QM.Post;
         DBS.QM.Active :=False;
         MyCommitTransaction(nil);
(QM is a TQuery)
 but next time when I try to fetch the Image, I get a JPEG error #52.
the code is :
   if (QIIIMAGE.BlobSize >0) then begin
      try
        DMS :=TMemoryStream.Create;
        JPI :=TJpegImage.Create;
        QIIIMAGE.SaveToStream(DMS);
        DMS.Position :=0;
        JPI.LoadFromStream(DMS);
        ...

QIIIMAGE is the Blob field, for example, if I saved a image size is
27,The QIIIMAGE.BlobSize is right, but if I save a 65K image to this
record, I get the QIIIMAGE.BlobSize 999996 !! the image is only 65k !

why? How can I set the ODBC driver' BLOB size limmit?

Any help would be appreciated.

Regards,

Simon  

 

Re:Sybase Adaptive Server Anywhere ODBC driver BLOBsize setting problem


ASA6 datasource configuration dialog has a checkbox "Delphi applications".
It should help.

--
----------------------
Regards
Robert Cerny
Remove both qwe when replying
email: robert.qwe.ce...@neosys.xrs.qwe.si

No questions via email, unless explicitly invited.

Re:Sybase Adaptive Server Anywhere ODBC driver BLOBsize setting problem


Hi
I have checked this checkbox,but nothing help, is
ASA only support 32k BLOB?
On Thu, 19 Oct 2000 02:50:40 +0200, "Robert Cerny"
Quote
<robert.qwe.ce...@neosys.xrs.qwe.si> wrote:
>ASA6 datasource configuration dialog has a checkbox "Delphi applications".
>It should help.

Re:Sybase Adaptive Server Anywhere ODBC driver BLOBsize setting problem


Hi, Simon

It is common trouble with BLOBS on SQLA and ASA via BDE (And another DB via
BDE, except Interbase) . I have DB with photo of customers (several a
thousand) and my solution is:
a) increase BLOB size parameter in BDE admin for your alias some great them
size of yours BLOBs.
b) use separate query for fetch only ONE record with BLOB. After this you
will have live BLOB, which will be fetched correctly (full size). You can
show it on the screen and write modification to DB.

After this modification my program can easy read photos from digital camera,
write its to ASA and show its again. You can write questions to my e-mail.

PS. Sorry for my bad english

Best wishes,
Oleg
----------------------------------
Oleg Kovalevsky
Moscow, Russia

Re:Sybase Adaptive Server Anywhere ODBC driver BLOBsize setting problem


Hi Kovalevsky
I just do it as you say, I set the BLOB size to 1000
and use live BLOB to access BLOB,but :(((.....,
is your photo large than 32k?, My application can run
against ASE but can not run on a ASA database
On Fri, 20 Oct 2000 12:43:09 +0400, "Oleg Kovalevsky"
Quote
<okovalev...@hotmail.com> wrote:
>Kovalevsky

Re:Sybase Adaptive Server Anywhere ODBC driver BLOBsize setting problem


Yes, Simon,
my BLOBS is great than 32 kB.

Best wishes,
Oleg Kovalevsky
----------------------------------
Oleg Kovalevsky
Moscow, Russia
e-mail: ge...@aha.ru

Quote
Simon Wang <simo...@online.sh.cn> wrote in message

news:39f0b646.12387843@forums.borland.com...
Quote
> Hi Kovalevsky
> I just do it as you say, I set the BLOB size to 1000
> and use live BLOB to access BLOB,but :(((.....,
> is your photo large than 32k?, My application can run
> against ASE but can not run on a ASA database
> On Fri, 20 Oct 2000 12:43:09 +0400, "Oleg Kovalevsky"
> <okovalev...@hotmail.com> wrote:

> >Kovalevsky

Other Threads