1) Use a PreparedStatement for your insert query. 2) Get an InputStream or Reader from the File 3) Use the PreparedStatement's most appropriate setXXX method. 4) executeUpdate() the PreparedStatement 5) close() the PreparedStatement 6) close() the InputStream or Reader from step 2
Words in capitals indicate the class to look for. Words with () behind them indicate the method to use.
As for the most appropriate setXXX method, setAsciiStream or setCharacterStream are good options for character data (text files), whereas for DOC or PDF you'd want to store them in binary form, using setBinaryStream. [ March 10, 2008: Message edited by: Rob Prime ]