Results 1 to 15 of 15
  1. #1
    Join Date
    Nov 2006
    Posts
    5

    Unanswered: How to save jpg, bmp files to DB2?

    How can I do so? Thanks a lot

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,
    what is your database type and version and what is your operating system name and version?
    Grofaty

  3. #3
    Join Date
    Nov 2006
    Posts
    5
    Thank you for your reply.

    DB is DB2 version 7
    OS is Window XP

  4. #4
    Join Date
    Jun 2006
    Posts
    471

    bmp

    create a table with column type blob (eg col1 char(1), col2 blob xxM
    create input data file eg test.data with record :
    xxx,c:\tmp\filename <<--- the filename of object bmp...
    import from test.data of del modified by lobsinfile insert into tablename
    this will import the col1 with data and col2 with files
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  5. #5
    Join Date
    Nov 2006
    Posts
    5
    Thank you very much.
    Let me try it.

  6. #6
    Join Date
    Jan 2003
    Posts
    35
    I know this question may sound stupid.
    We can save the documents or jpg files as blob . But can we retrieve and see this jpgs through some db client and actually see them as jpgs and not as some encrypted data?

  7. #7
    Join Date
    Aug 2005
    Posts
    24
    Hi,

    May I know whether we can store the BLob(e.g bmp files) data type to DB2 UDB 7.1 (not an Enterprise Edition) without installing any other tools???


    Thanks,
    cool



    Quote Originally Posted by guyprzytula
    create a table with column type blob (eg col1 char(1), col2 blob xxM
    create input data file eg test.data with record :
    xxx,c:\tmp\filename <<--- the filename of object bmp...
    import from test.data of del modified by lobsinfile insert into tablename
    this will import the col1 with data and col2 with files

  8. #8
    Join Date
    Aug 2005
    Posts
    24

    Cool

    Yes.I am also interested in this question.
    How to retrieve those jpg files from DB2 to see as normal Jpg files???

    Thanks,


    Quote Originally Posted by manish21
    I know this question may sound stupid.
    We can save the documents or jpg files as blob . But can we retrieve and see this jpgs through some db client and actually see them as jpgs and not as some encrypted data?

  9. #9
    Join Date
    Jun 2006
    Posts
    471

    bmp

    yes in V7 this was also available
    to view actually these pictures or any other object usually :
    - or use a tool that can match a column with a specific program to open this blob : like qmf is doing. whenever this column is clicked, a program will be launched to handle this object.
    - there are also extenders in db2 available that handle this in similar way
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  10. #10
    Join Date
    Nov 2006
    Posts
    5
    Thank you very much for your reply.
    But I still wonder to know which extenders in DB2 can do so.
    Thanks a lot

  11. #11
    Join Date
    Jun 2006
    Posts
    471

    extenders

    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  12. #12
    Join Date
    Nov 2006
    Posts
    5
    It sounds great!!!
    But my version is 7, can I still use it?
    Thanks.

  13. #13
    Join Date
    Jun 2006
    Posts
    471

    ext

    yes, these extenders existed already before V7
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  14. #14
    Join Date
    Aug 2005
    Posts
    24
    Quote Originally Posted by guyprzytula
    yes in V7 this was also available
    to view actually these pictures or any other object usually :
    - or use a tool that can match a column with a specific program to open this blob : like qmf is doing. whenever this column is clicked, a program will be launched to handle this object.
    - there are also extenders in db2 available that handle this in similar way
    Hi Guy Przytula,

    May I know qmf is a tool or command?
    Is there any other way to store the bmp/jpg files without using extender or tool???
    I mean : is there any command for it???

    Thanks,

  15. #15
    Join Date
    Jun 2006
    Posts
    471

    bmp

    QMF (query management facility) for windows/mainframe is a software from IBM
    it allows users to create/share query-reports-procedures

    yes : import can do for insert/update of new/replace files
    it can also be done with applications like java : see
    http://www-128.ibm.com/developerwork...310bhogal.html
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

Posting Permissions

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