Storing of Word Docs in the database


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1

Thread: Storing of Word Docs in the database

  1. #1
    Join Date
    Jan 2005
    Location
    Bangalore
    Posts
    19

    Unhappy Storing of Word Docs in the database

    Hi,

    Can anyone tell me how I could save the doc that I have retrieved (using the File tag).
    Iím able to read the file; I would like to know how I could save the same in the database (SQL) i.e. the file streams that I could use in the JSP tag.

    the following code only helps me to view the contents in the server as an output...

    String f1=request.getParameter("file");
    System.out.println("f1----------------"+f1);
    // Open the file that is the first
    // command line parameter
    FileInputStream fstream = new FileInputStream(f1);
    // Convert our input stream to a
    // DataInputStream
    DataInputStream in = new DataInputStream(fstream);
    // Continue to read lines while
    // there are still some left to read


    while (in.available() !=0)
    {
    // Print file line to screen
    System.out.println (in.readLine());
    }

    in.close();

    But i need to save the same in another file and then save it in the local SQL server machine.

    Can anyone please help me?


    Thanks in advance.
    Last edited by Litha; 01-24-2005 at 09:46 AM.
    Cheers,

    Lee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center