Images stored in a database for use in a Java app...

First, is it possible to store an image file in a database? I've done it in VB, but we all know that you can do a lot of things in VB without really knowing what you did.

The program is a database program that displays information from a database on a Java GUI. Part of that information is going to be a .jpg image. I can store the name of the image as a String in the database and just draw it to the screen but I would prefer to store the actual image to the database. This would be for ease of use by the end-user.

Any input would be fantastic.

-V.
[italic]
[b]Discipline[/b] - The desire to do the right thing in the absence of both leadership and consequence.
[/italic]

Comments

  • you can use the same method that u used in VB to store an image in the database (access/sql server?)....
    the way in which the image is stored does not change if ur interacting with the same type of database using java....
    what the image is to be retreived into is for u to find out.....some class in the java.awt.image package...


    : First, is it possible to store an image file in a database? I've done it in VB, but we all know that you can do a lot of things in VB without really knowing what you did.
    :
    : The program is a database program that displays information from a database on a Java GUI. Part of that information is going to be a .jpg image. I can store the name of the image as a String in the database and just draw it to the screen but I would prefer to store the actual image to the database. This would be for ease of use by the end-user.
    :
    : Any input would be fantastic.
    :
    : -V.
    : [italic]
    : [b]Discipline[/b] - The desire to do the right thing in the absence of both leadership and consequence.
    : [/italic]
    :

    [hr]
    [purple]
    [b]there is no [red]spoon[/red]...
    [/b]
    [purple]

  • : you can use the same method that u used in VB to store an image in the database (access/sql server?)....
    : the way in which the image is stored does not change if ur interacting with the same type of database using java....
    : what the image is to be retreived into is for u to find out.....some class in the java.awt.image package...


    My issue is not with what to do with the image when I pull it back, it's more about how I would declare the data type in the table where I would store the image. I just figured since I was doing it through Java and using java.sql to do it, someone here might have some input.

    -V.
    [italic]
    [b]Discipline[/b] - The desire to do the right thing in the absence of both leadership and consequence.
    [/italic]

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories