aspose file tools*
The moose likes JDBC and the fly likes Updatin blob column in a table with file on my disk Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Updatin blob column in a table with file on my disk" Watch "Updatin blob column in a table with file on my disk" New topic
Author

Updatin blob column in a table with file on my disk

navi kumar
Ranch Hand

Joined: May 10, 2006
Posts: 47
Hi all,

Could someone help me!

I have a file called "FILE.txt" on my disk at c:/dir/FILE.txt

Now I want to upload this file into the following table.

Table NAME : ATTACHMENTS_TABLE

FILE_NAME varchar2(30)
FILE_CONTENT BLOB
ATTACHED_DT DATE

Can some one suggest how to get that file on my disk into the input Stream?

THanks for you help
Dan Howard
Ranch Hand

Joined: Feb 22, 2004
Posts: 47
You could read the whole file into a string and then simply assign the string:

navi kumar
Ranch Hand

Joined: May 10, 2006
Posts: 47
Dan, thanks for you reply

Can I give something like this:

String filePath = C:/dir/file.txt;

Regards,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Updatin blob column in a table with file on my disk