Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Starting Point for Script that Inserts a Folder of .PDF files into an SQL Server Database

 
Jonathan Yanes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I was wondering if anyone could point me in the right direction with some sample code snippets etc, for the following: I want to create a Java Application that runs standalone on a scheduled/cron basis. When it runs it will look at a folder say "reports" and read each .pdf file in that folder and load it into a SQL Server database as Binary data. After each file is done being migrated to the database i want to archive the pdf. Any pointers? Place to start?
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start from the top down. Write a program which looks in a folder and identifies all the PDF files.

You have at least four different questions in that post, five or six maybe depending on how you count. So you really ought to separate the job into its component parts and take care of them one at a time. I've identified the first part above. After that you can change the program so that it actually does something with the PDFs.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jonathan,
Welcome to JavaRanch!

Since you asked this in the database forum, I'll answer for the JDBC part. Take a look at this tutorial on BLOBs for storing binary data.
 
Jonathan Yanes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Awesome. Thanks for the reply...i will take a look.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic