Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 9th, 2006, 03:24 PM
Registered User
Join Date: Dec 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to store MS Word File in database

hi all,
i have some word files and i need them to be stored in SQL database in binary format.
also i may need to open same word file from the database itself.

how to do that?

Old January 7th, 2007, 05:25 PM
Authorized User
Join Date: Jan 2007
Posts: 46
Thanks: 2
Thanked 1 Time in 1 Post

Now for performing such a task you really need some other front-end tool like Visual Basic, or any other programming language.As far as i know there is no such facility available to achieve something like that in SQL alone.

And further i would ask you to break down your task into smaller subtasks.What you want to do involves various steps.

Old March 1st, 2007, 06:34 AM
Authorized User
Join Date: Mar 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Kesar,

We have been provided an special datatype IMAGE in SQL Server to store binary data. Create a table with a cloumn of IMAGE datatype, then u can insert any type of file using Simple INSERT statement, like...

INSERT INTO TableName(ColumnName) VALUES('C:\MyData\MyFile.doc')

'C:\MyData\MyFile.doc' is the complete path of ur word file.
But U can not view that file by simply a SELECT statement. You will Have to Use some front-end as CODE_LOVER said earlier.

If U r using Oracle DB, there is BLOB datatype


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open a MS Word doc saved in a database cmw2992 Classic ASP Databases 0 November 26th, 2007 01:22 PM
How to open .DOC in MS-Word file thru a link ? sherbir Javascript 10 March 8th, 2006 06:20 AM
read content of MS Word file using PHP gokulnathan Pro PHP 0 November 25th, 2004 01:07 AM
read content of MS Word file using PHP gokulnathan PHP How-To 0 November 22nd, 2004 08:02 AM
How to open a .DOC file with MS-Word ? sherbir Servlets 0 July 26th, 2004 02:39 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.