Board index » delphi » Problems storing Graphics in a TTable over Sybase

Problems storing Graphics in a TTable over Sybase

I have this lines of code :

        MB.Images       : TTable
        fImage          : TBitmap
.
.
.
        MB.Images.Append;
        MB.Images.Fields[0].AsInteger := ID;
        MB.Images.Fields[1].AsInteger := MBFFoto;
        MB.Images.Fields[2].Assign(fImage);
        MB.Images.Post;
        MB.Images.CommitUpdates;

And I have an execution error like "Bitmap image is not valid"
I tried with BMP Windows Format and BMP OS/2 Format with no success

If i save a little image < 16 KB, it make fine.

If some body has a solution,
thank's in advance.

Raoul
--

+--------------------------------------------------------+
|Raul Herreros Turpaud                                   |
+--------------------------------------------------------+
|Departamento de Desarrollo                              |
|Antartica Quebecor S.A.                                 |
+-----------------------+--------------------------------+
|Av. Los Pajaritos 6920 |Telefono: 56 (2) 440 5765       |
|Estacion Central       |FAX     : 56 (2) 440 5890       |
|Santiago - CHILE       |EMail   : rherr...@antartica.cl |
+-----------------------+--------------------------------+

          ()~~~()
          ( @ @ )
+-.oooO-----(_)----Oooo.-+
| RRRRR   H    H TTTTTTT |
| R    R  H    H    T    |
| R    R  H    H    T    |
| RRRRR   HHHHHH    T    |
| R  R    H    H    T    | Raul Herreros Turpaud
| R   R   H    H    T    | Maria Estuardo 515 - Las Condes
| R    R  H    H    T    | Santiago - CHILE
|     .ooo0              | Telefono: 56 (2) 211 5691
|      (  )   Oooo.      | EMail: raoul...@usa.net
+-------\ (---(   )------+
         \_)   ) /
              (_/

 

Re:Problems storing Graphics in a TTable over Sybase


What kind of database and what kind of TFields do you use?

Karlheinz Spaeth

Re:Problems storing Graphics in a TTable over Sybase


Hi Raoul,

        this is an already know problem by the Sybase ODBC driver.
The blob data is cut at 32 kB. There is an EBF for SQL-AW 5.5.04
available. Try to mail the support or look at the website of
Sybase/Powersoft.

Raul Herreros T. schrieb:

Quote

> I have this lines of code :

>         MB.Images       : TTable
>         fImage          : TBitmap
> .
> .
> .
>         MB.Images.Append;
>         MB.Images.Fields[0].AsInteger := ID;
>         MB.Images.Fields[1].AsInteger := MBFFoto;
>         MB.Images.Fields[2].Assign(fImage);
>         MB.Images.Post;
>         MB.Images.CommitUpdates;

> And I have an execution error like "Bitmap image is not valid"
> I tried with BMP Windows Format and BMP OS/2 Format with no success

> If i save a little image < 16 KB, it make fine.

> If some body has a solution,
> thank's in advance.

> Raoul

Greeting from Cologne
  Chris

-------------------------------------------------------
Chris Gnther
chr...@netcologne.de or g...@ifacs.de
-------------------------------------------------------

Other Threads