CLOB

Posted by anandknr on 08-Dec-2010 21:48

Hai all ,

     I have some problem with clob datatype in DB . I  want to store images in DB and i used CLOB for that after serializing  the image .

     I have used LONGCHAR to hold the serialized image and assign LONGCHAR to CLOB in DB on clicking the save button .

But the problem is some images when  serialized produces very large characters but still it can be holded in  LONGCHAR but when i assign it to CLOB it throws an alertbox saying that  "Could not update large object segment  during copy .(11322) " .

I am very confused because why data in LONGCHAR cannot be inserted into a CLOB .

I have also tried with

     COPY-LOB m_imageRaw to diningrm.backgroundImage .

     ( where m_imageRaw is the LONGCHAR and backgroundImage is the CLOB in diningrm table )

     even that not working and produces the same error .

[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/ImageProcessor.cls.zip:550:0]

All Replies

Posted by Admin on 08-Dec-2010 22:25

But the problem is some images when  serialized produces very large characters but still it can be holded in  LONGCHAR but when i assign it to CLOB it throws an alertbox saying that  "Could not update large object segment  during copy .(11322) " .

I can't tell you anything about your error, but why don't you use a BLOB for images? CLOB and LONGCHAR are subject to codepage conversion. Maybe that's part of the issue.

Since you are posting this in the GUI for .NET forum, I assume that you are on 10.2B and using the GUI for .NET. BLOB's are compatible to a System.Byte[] data type. Then you don't need to use any kind of character serialization at all.

Posted by anandknr on 09-Dec-2010 00:05

def  var byt as "System.Byte[]" .


find first diningrm .
          ASSIGN  diningrm.test = byt .

( test is BLOB )

why this not working,can u give that syntax ?

Posted by maximmonin on 09-Dec-2010 02:01

COPY-LOB FROM FILE FileName

  Starting AT BytesFrom FOR CopyBytes TO table.dbfield NO-CONVERT.

Posted by anandknr on 10-Dec-2010 03:27

Thanx Monin , that really helped me a lot.

This thread is closed