• 0
name Punditsdkoslkdosdkoskdo

How to save images provided by a user to a database using Java

I am planning how I to write a GUI Java application that displays a form to the user to add information about themselves. One of the things I want to include is the ability for the user to add a picture to the form. Upon submission the picture and the rest of the info will then be saved to a database. Being new to java I was hoping for some instructional Links or tips as to how to accomplish this. I was thinking of setting one of my columns in my table as a 'BLOB' type and then saving them to it, but that is just a shot in the dark. I really don't know what the column type should be (byte, blob, ect...), or how to code so that the picture will be saved to my database for display later. I guess my question is how to get and save a picture to a database from a form. I am going to attempt this using eclipse, and am still unsure what I will use for the database. Sorry about any confusion, and thanks for reading!!