So I don't know how much this falls under the JDBC category but if I am using JDBC to connect my Java application to a MySQL database, how can I add functionality for attaching pictures to this application?
Any advice would be much appreciated.
Thanks,
Rohan
Rohan Kalra wrote:So I don't know how much this falls under the JDBC category but if I am using JDBC to connect my Java application to a MySQL database, how can I add functionality for attaching pictures to this application?
Any advice would be much appreciated.
Thanks,
Rohan
need more info. Where are the pictures coming from and where are they going to? Are you talking about users uploading pictures?
Rohan Kalra
Greenhorn
Joined: Jun 28, 2010
Posts: 7
posted
0
So it's like a mock-up of a prison system. A very basic one. Say the prison official using it enters details of crimes and inmates and then wants to attach pictures to the inmate details. He has the image files on his computer, but he just wants to attach the correct file to an inmates profile.
So I figured it would probably be better to have the pictures on the server or even the local machine since the pictures will be used by only one section/division. I'm not exactly sure how this works to be honest but I do realize that putting in a couple of pictures for every entry will probably take up too much space on a database.
Rohan Kalra
Greenhorn
Joined: Jun 28, 2010
Posts: 7
posted
0
So anyone have any idea at all? I skipped this for a few days but still failed when i tried some stuff last night, probably cause I have no idea. I want to be able to add images to my Java Application that uses JDBC to connect to a MySQL database. The images will be stored on the local machine, not on the server. Thanks.
Rohan Kalra wrote:So anyone have any idea at all? I skipped this for a few days but still failed when i tried some stuff last night, probably cause I have no idea. I want to be able to add images to my Java Application that uses JDBC to connect to a MySQL database. The images will be stored on the local machine, not on the server. Thanks.
share what you have tried. What code are you using to get images from local filesystem?
i would suggest you better use path to the image files because otherwise it will take quite some space on the database itself ... and it's easy too as you just have to read the files location but then you will need to employ certain mechanism to read those files from their respective locations every time the view changes
but as you are probably going to save those image files on the desktop machine itself you can this shouldn't be much of an issue ...
anyways you should google about which format mySQL uses for images ... and you can then easily retrieve the images from there using the "blob" type ... JDBC
If you want the pictures stored on the local machine, then this is not a JDBC related post.
JDBC implies that you want to store the image on the database server, but you don't want that.