This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

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
  • 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?
 
Sheriff
Posts: 24654
58
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.
 
author & internet detective
Posts: 39582
781
Eclipse IDE VI Editor Java
  • 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.
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!