Howdy, Stranger!

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

Categories

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

vladimyr67vladimyr67 Member Posts: 24
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

  • sumedhsumedh Member Posts: 103
    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]

  • vladimyr67vladimyr67 Member Posts: 24
    : 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]

  • Shawn CarterShawn Carter Member Posts: 0

    _____ ( http://forcoder.org ) free ebooks and video tutorials about ( Assembly, C#, Python, Ruby, R, Go, PHP, PL/SQL, Visual Basic .NET, Visual Basic, MATLAB, JavaScript, Objective-C, Java, Swift, Perl, C++, Scratch, Delphi, C COBOL, Apex, LabVIEW, Prolog, F#, Fortran, Lisp, FoxPro, Erlang, Ada, Julia, Dart, Logo, Lua, Alice, VBScript, Kotlin, Scheme, Crystal, Bash, Scala, Awk, Clojure, Hack, ML, Rust, SAS, ABAP, Transact-SQL, D ) ____

Sign In or Register to comment.