Adding gif\png to database column?

From: IchBin (weconsul_at_ptd.net)
Date: 12/19/04

  • Next message: Michael Rauscher: "Re: Adding gif\png to database column?"
    Date: Sun, 19 Dec 2004 01:01:40 -0500
    
    

    Hello all...

    I have not attempted to add a gif\png to a database column before using
    java, only 4gl lang. So correct me if I am on the wrong path. I have lot
    of questions. I am using HSQLDB.

    First off, the largest gif file is only 2k that will be inserted. I
    figured I should define the field type as VARBINARY.

    My questions:

    - Should I use a column field defined as an OTHER|OBJECT or VARBINARY?
    - Which is more efficient?

    Not sure how to add in code. This table is displayed for information
    only with JTable class. Can I just run native SQL code in the database
    manager to insert the gif\png objects. How could I do this. I think have
    done this before using Oracle and sybase. The reference for the object
    was is dos path. If I had to insert them into a column from java code
    what would my sql prepare statement look like?

    Or

    Could I just add the name of the gif\png to the column of type varchar.
    When I am loading my JTable I could just get the image from jar and load
    it at execution time.

    Sorry for the confusion.. Just need some direction.

    --
    Thanks in Advance...
    IchBin
    __________________________________________________________________________
    'The meeting of two personalities is like the contact of two chemical 
    substances:
    if there is any reaction, both are transformed.'
    - Carl Gustav Jung, (1875-1961), psychiatrist and psychologist
    

  • Next message: Michael Rauscher: "Re: Adding gif\png to database column?"