storing and loading images in a java application using mysql
843854Mar 19 2004 — edited Apr 11 2006Hi!
I hava a java application connected to mysql database. I have data (questions) stored in the mysql database which is randomly generated when a query is executed.In the following snippet, the first line calls the database connection class and connects to the database and then the query is executed.
DBAccess dba = new DBAccess();
res = dba.query("select.....from..");
Is is possible to assign an image to each question which is randomly generated. So when it displays a question, the image will also load up. I understand that I have to use blob field to store the binary data, hence the image but I have no idea how to go about that. Also when extracting an image, what exactly is the sytax for the query? Can anybody help pleaseeeeeeeeeee!!!
Really appreciate it :)
Thanks