Results 1 to 4 of 4

Thread: Insert into DB2 CLOB column

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    2

    Insert into DB2 CLOB column

    Hi, can anyone tell me how use insert data into the DB2 CLOB column using Visual Basic?

    I understand there is a 32K limit in DB2 when using a sql statement to insert a CLOB field.

    Do I have other method to get around with this problem? Please let me know how it's done. Example(s) would be greatly appreciated.

    Thank-you.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,501

    Re: Insert into DB2 CLOB column

    Moved from FAQ forum


    Do you actually mean BLOB rather than CLOB, or is this a kind of field that I haven't heard of?


    For a BLOB field, see the "How do I save an image" thread in the Database FAQ (link in my signature).

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    2

    Re: Insert into DB2 CLOB column

    Thank you si_the_geek for the reply.

    BLOB and CLOB (Character Large Object) are pretty much the same. These data type in the database are used to store large object data. If you have solution to insert object into the BLOB column, it will apply the same for CLOB column.

    I tried to write a VB program to insert a huge charater string in the BLOB/CLOB column in the DB2 database. However, I understand that there is a 32K limit when inserting a large object into DB2. I am trying to find ways to get around it with VB.
    Last edited by vb4me2; Apr 25th, 2006 at 09:11 PM.

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,501

    Re: Insert into DB2 CLOB column

    If the limit is for the database, then you are stuck.

    If the limit is just on Insert statements, you should be able to use AppendChunk etc, as shown in the FAQ thread I talked about. This is the attachment from there which explains it all.

    edit: I have now posted the contents of the attachment directly to the FAQ thread.
    Last edited by si_the_geek; Apr 26th, 2006 at 10:50 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width