• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Awesome. Thanks for the reply...i will take a look.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic