I have found 2 ways to attempt this but still unsuccessful with blob datatype for 1 of my tables... cannot find way to enter data or retrieve it.

I am using DB2 and PHP using PHP's ODBC support.

  1. I read the client image file using fread(). Then change it to replace " with ' (note: addslashes not used since that is only for mySQL). Then store the variable containing the image into the db using simple insert. This fails. Does someone know the correct procedure??

  2. The other scenario explained to me was to bind the input file to the column using something like orabind() for oracle. BUT what is the function to be called for odbc ??
    Also I know there are DB2 stored procedures that do this bind, BUT HOW DO I CALL DB2 Stored Procedures through PHP?????

Thanks in advance.

    2 months later

    Hi ,

    Even i am trying to insert and retrieve image into a blob datatype in oracle8.0.6 using vignette story server 5.5 ,i am storing it into a variable and than inserting it but unable to retrieve it...it shows me blank result.

    is there any way in oracle where we can insert images into blob and retrieve it independently .

    plz --if anybody has any idea abt this plz update.

    thanks
    amit

      14 days later

      Hi,
      This is a big problem to store images in Blob & CLOB,
      I too have the same problem.
      Please mail me if somebody finds the solution.
      Thanking You in Advance,
      Hemant.

        9 months later

        Hello.If you use Oracle,try with SQL*Loader, you'll find more in Oracle Documentation.

          Write a Reply...