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]
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.
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 ?
COPY-LOB FROM FILE FileName
Starting AT BytesFrom FOR CopyBytes TO table.dbfield NO-CONVERT.
Thanx Monin , that really helped me a lot.