Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    205

    Unanswered: Issue in inserting into a blob datatype column

    Hi all,

    I am using DB2 8.1 version. I get this following error when I try to insert value into blob datatype column.

    INSERT INTO eventalertfilter VALUES ('[B@16ab2e8')

    Please explain this.

    Thanks,
    Sam

  2. #2
    Join Date
    Feb 2004
    Location
    Copenhagen
    Posts
    220

    Lightbulb Which error ??

    I think you copied wrong ,-)
    Kristian K. Hansen
    Project Supervisor
    National Board of Health

  3. #3
    Join Date
    Mar 2004
    Posts
    205
    What you mean by 'copied wrong' ?

    I found the solution :

    insert into test values(blob('fgfg'))

    blob function should be given , if the column is of blob datatype.

    I think I am right. If not please specify. Also if anyother solution is available kindly suggest.

    Thanks,
    Sam

  4. #4
    Join Date
    Feb 2004
    Location
    Copenhagen
    Posts
    220

    Smile

    I mean that I can't see that you specified any error message:

    But yes you have to state the BLOB function if you are inserting
    a string like above - to let db2 know that 'blahblab' should be
    treated as a binary object (casting it - if you like)

    If you are inserting a (binary) file:

    insert into mytable values ('/pathonserver/myclobfile.extension')

    Should do the trick.

    HTH
    Kristian K. Hansen
    Project Supervisor
    National Board of Health

  5. #5
    Join Date
    Feb 2004
    Location
    Copenhagen
    Posts
    220

    Red face Wait

    Forget the last two sentences.

    I only tested it on CLOB and it did insert the string.

    But it did not insert the file - does anyone know how to take
    the ascii content of a file on the same server an inserting it
    into the CLOB clumn ?

    Cheers
    Kristian K. Hansen
    Project Supervisor
    National Board of Health

Posting Permissions

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