Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2012

    Unanswered: Image upload in DB2 database

    hai I am new to Db2 and developing webapps
    I need to know how to store the image in IBM DB2 uploaded in a HTML form and how to retrive it.

    I know that BLOB has to be used but the logic !!!!!!!!!!!!
    A snippet would suffice me

  2. #2
    Join Date
    Aug 2001

    If Unix, the sqllib is under the instance owner home directory
    On Windows , it is under the installation directory


    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jan 2007
    Jena, Germany
    A BLOB is like any other data type. Once you have a variable in your application that holds the BLOB's content (image data), you can simply insert it. So there is nothing special about it.

    Usually, it is a good idea to use parameter markers to avoid problems with the BLOB content - or you convert it explicitly to hex representation. Actually, using parameter markers in query is very often a good idea anyway to avoid SQL injection problems. But it has a performance impact because the optimizer won't know the value of the parameter marker during optimization phase, which means that selectivity estimates tend to be not as good as with literals.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Tags for this Thread

Posting Permissions

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