Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

inserting pdf in longblob using JDBC and mysql  RSS feed

crazysam Ray
Posts: 13
Java ME Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!!

Can some one please provide me with a sample code using where on a button click:

1) I can insert a pdf into longblob of mysql and with a name of file which will use varchar in mysql.
2) I can retrieve a pdf using file name(consider it is the primary key) and show it to the user.

As is clear from above, my table has two columns:
filename ------------------------------pdf_file

stock ----------------------------------stock.pdf
kids ----------------------------------kid.pdf

Please explain using the above scenario as I am a newbie in Java.

Thanks in advance!!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!